whyclxw
2024-04-28 b25b814a949d2065a61fd3167206ffb51a57af65
src/main/java/com/whyc/controller/PowerInfController.java
@@ -19,10 +19,12 @@
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RequestMapping("powerInf")
@RestController
@Api(tags = "数据管理-电源信息")
public class PowerInfController {
public class PowerInfController extends BaseController{
    @Autowired
    private PowerInfService service;
    @Autowired
@@ -83,13 +85,13 @@
        return res;
    }
    @PutMapping
    @PostMapping("update")
    @ApiOperation(value = "更新电源")
    public Response update(@RequestBody PowerInf powerInf){
        service.updateByPowerDeviceId(powerInf);
        return new Response().set(1,true,"更新成功");
    }
    @DeleteMapping
    @PostMapping("delete")
    @ApiOperation(value = "删除电源")
    public Response delete(@RequestParam Integer powerDeviceId){
        service.deleteByPowerDeviceId(powerDeviceId);
@@ -178,13 +180,13 @@
    }*/
    @ApiOperation(value = "填写异常原因",notes = "传入字段 num,exceptionCause,exceptionCauseAnalysis")
    @PutMapping("exceptionCause")
    @PostMapping("exceptionCause")
    public Response updateExceptionCause(@RequestBody PowerInf powerInf){
        return service.updateExceptionCause(powerInf);
    }
    @ApiOperation(value = "取消异常原因", notes = "传入字段 num")
    @PutMapping("cancelExceptionCause")
    @PostMapping("cancelExceptionCause")
    public Response updateCancelExceptionCause(@RequestParam int num) {
        return service.updateCancelExceptionCause(num);
    }
@@ -215,4 +217,10 @@
        return service.getModelList();
    }
    @PostMapping("getModelListByPwrProducer")
    @ApiOperation(value = "根据品牌查询型号")
    public Response getModelListByPwrProducer(@RequestBody List<String> producer) {
        return service.getModelListByPwrProducer(producer);
    }
}