| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.constant.BattStateEnum; |
| | | import com.whyc.constant.DevAlarmEnum; |
| | | import com.whyc.constant.PowerAlarmEnum; |
| | | import com.whyc.constant.*; |
| | | import com.whyc.dto.AlarmParam; |
| | | import com.whyc.dto.Real.AlmDto; |
| | | import com.whyc.dto.Response; |
| | |
| | | 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") |
| | |
| | | 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("修改电源告警参数") |
| | |
| | | list.add(new AlarmParam(devAlarmEnum.getStateId(),devAlarmEnum.getStateName())); |
| | | } |
| | | }else{ //电池告警 |
| | | for (BattStateEnum battStateEnum:BattStateEnum.values()){ |
| | | list.add(new AlarmParam(battStateEnum.getStateId(),battStateEnum.getStateName())); |
| | | for (BattSingalIdEnum battSignalIdEnum:BattSingalIdEnum.values()){ |
| | | list.add(new AlarmParam(battSignalIdEnum.getStateId(),battSignalIdEnum.getStateName())); |
| | | } |
| | | } |
| | | return new Response<List<AlarmParam>>().set(1,list); |