package com.whyc.controller; import com.whyc.dto.Response; import com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarmParamStand; import com.whyc.service.PwrdevAlarmParamStandService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; @RestController @Api(tags = "标准参数管理") @RequestMapping("stand") public class PwrdevAlarmParamStandController { @Autowired private PwrdevAlarmParamStandService service; @ApiOperation(value = "查询标准参数") @GetMapping("getPwrStandParam") public Response getPwrStandParam(@RequestParam Integer powerType){ return service.getPwrStandParam(powerType); } @ApiOperation(value = "设置标准参数") @PostMapping("setPwrStandParam") public Response setPwrStandParam(@RequestBody PwrdevAlarmParamStand stand){ return service.setPwrStandParam(stand); } @ApiOperation(value = "查询规范文件") @GetMapping("getStandFile") public Response getStandFile(@RequestParam Integer powerType,@RequestParam String fileName){ return service.getStandFile(powerType,fileName); } @ApiOperation(value = "上传规范文件") @PostMapping("uploadStandFile") public Response uploadStandFile(@RequestParam MultipartFile multipartFile,@RequestParam String num) throws IOException { return service.uploadStandFile(multipartFile,num); } @ApiOperation(value = "添加标准参数") @PostMapping("addPwrStandParam") public Response addPwrStandParam(@RequestBody PwrdevAlarmParamStand stand){ return service.addPwrStandParam(stand); } }