whyclxw
2025-06-11 c2b79c30c9f8f782624e224c65f61efa98d90078
电池电源告警参数修改
3个文件已修改
39 ■■■■■ 已修改文件
src/main/java/com/whyc/controller/AlmParamController.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BattAlmparamService.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/PwrdevAlarmParamService.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/AlmParamController.java
@@ -34,11 +34,17 @@
    private PwrdevAlarmParamService pwrAlmparamService;
    @PostMapping("getBattAlmParam")
    /*@PostMapping("getBattAlmParam")
    @ApiOperation("获取电池告警参数")
    public Response getBattAlmParam(@RequestBody AlmDto almDto){
        almDto.setUid(ActionUtil.getUser().getId());
        return battAlmparamService.getBattAlmParam(almDto);
    }*/
    @GetMapping("getBattAlmParam")
    @ApiOperation("获取电池告警参数")
    public Response getBattAlmParam(@RequestParam Integer battgroupId){
        return battAlmparamService.getBattAlmParam(battgroupId);
    }
    @PostMapping("setBattAlmParam")
@@ -59,13 +65,20 @@
        return devAlmparamService.setDevAlmParam(almparamList);
    }
    @PostMapping("getPwrAlmParam")
    /*@PostMapping("getPwrAlmParam")
    @ApiOperation("获取电源告警参数")
    public Response getPwrAlmParam(@RequestBody AlmDto almDto){
        almDto.setUid(ActionUtil.getUser().getId());
        return pwrAlmparamService.getPwrAlmParam(almDto);
    }*/
    @GetMapping("getPwrAlmParam")
    @ApiOperation("获取电源告警参数")
    public Response getPwrAlmParam(@RequestParam Integer powerId){
        return pwrAlmparamService.getPwrAlmParam(powerId);
    }
    @PostMapping("setPwrAlmParam")
    @ApiOperation("修改电源告警参数")
    public Response setPwrAlmParam(@RequestBody List<PwrdevAlarmParam> almparamList){
src/main/java/com/whyc/service/BattAlmparamService.java
@@ -18,11 +18,12 @@
    @Autowired(required = false)
    private BattAlmparamMapper mapper;
    //获取电池告警参数
    public Response getBattAlmParam(AlmDto almDto) {
        PageHelper.startPage(almDto.getPageNum(),almDto.getPageSize());
        List<BattAlmparam> list = mapper.getBattAlmParam(almDto);
        PageInfo  pageInfo=new PageInfo(list);
        return new Response().setII(1,list!=null,pageInfo,"获取电池告警参数");
    public Response getBattAlmParam(Integer battgroupId) {
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("battgroup_id",battgroupId);
        wrapper.orderByAsc("alm_id");
        List<BattAlmparam> list = mapper.selectList(wrapper);
        return new Response().setII(1,list!=null,list,"获取电池告警参数");
    }
    //修改电池告警参数
    public Response setBattAlmParam(List<BattAlmparam> almparamList) {
src/main/java/com/whyc/service/PwrdevAlarmParamService.java
@@ -26,11 +26,12 @@
    private PwrdevAlarmParamMapper mapper;
    //获取电源告警参数
    public Response getPwrAlmParam(AlmDto almDto) {
        PageHelper.startPage(almDto.getPageNum(),almDto.getPageSize());
        List<PwrdevAlarmParam> list = mapper.getPwrAlmParam(almDto);
        PageInfo pageInfo=new PageInfo(list);
        return new Response().setII(1,list!=null,pageInfo,"获取电源告警参数");
    public Response getPwrAlmParam(Integer powerId) {
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("power_id",powerId);
        wrapper.orderByAsc("alm_id");
        List<PwrdevAlarmParam> list = mapper.selectList(wrapper);
        return new Response().setII(1,list!=null,list,"获取电源告警参数");
    }
    //修改电源告警参数
    public Response setPwrAlmParam(List<PwrdevAlarmParam> almparamList) {