| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.BattMaintDealarm; |
| | | import com.whyc.dto.Page; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.paramter.AlarmPar; |
| | |
| | | import com.whyc.pojo.BattalarmData; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.service.BattalarmDataService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | @Api(tags = "电池实时告警") |
| | | @Api(tags = "告警管理-电池告警实时查询") |
| | | @RestController |
| | | @RequestMapping("/Battalarm_dataAction") |
| | | @RequestMapping("Battalarm_dataAction") |
| | | public class BattalarmDataController { |
| | | |
| | | @Autowired |
| | | private BattalarmDataService service; |
| | | |
| | | /*@GetMapping("/getAll") |
| | | @ApiOperation(value = "查询所有的实时告警")*/ |
| | | public Response<List<BattalarmData>> getAll(){ |
| | | @GetMapping("/getAll") |
| | | @ApiOperation(value = "查询所有的实时告警") |
| | | public Response getAll(){ |
| | | return service.getAll(); |
| | | } |
| | | |
| | |
| | | return service.getAllByPage(page); |
| | | } |
| | | //测试 |
| | | public Response<List<Batt_Maint_Dealarm>> test(@RequestBody BattalarmData battalarmData){ |
| | | public Response<List<BattMaintDealarm>> test(@RequestBody BattalarmData battalarmData){ |
| | | return service.test(battalarmData); |
| | | } |
| | | @PostMapping("/serchByCondition") |
| | |
| | | public Response<AlarmNumberRes> serchAlm(@RequestBody AlarmPar par){ |
| | | return service.serchAlm(par); |
| | | } |
| | | @PostMapping("/cancelalarm") |
| | | @ApiOperation(value = "取消告警",notes = "record_id,num") |
| | | public Response cancelalarm(@RequestBody BattalarmData adata){ |
| | | return service.cancelalarm(adata); |
| | | @GetMapping("/cancelalarm") |
| | | @ApiOperation(value = "取消告警",notes = "num") |
| | | public Response cancelalarm(@RequestParam Integer num){ |
| | | return service.cancelalarm(num); |
| | | } |
| | | |
| | | @PostMapping("/cancelalarmPro") |
| | | @ApiOperation(value = "批量取消告警",notes = "record_id,num") |
| | | public Response cancelalarmPro(@RequestBody List<BattalarmData> list){ |
| | | @ApiOperation(value = "批量取消告警",notes = "num") |
| | | public Response cancelalarmPro(@RequestBody List<Integer> list){ |
| | | return service.cancelalarmPro(list); |
| | | } |
| | | |
| | |
| | | return service.serchRealTime(uId); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @GetMapping("/update") |
| | | @ApiOperation(value = "确认告警",notes = "num") |
| | | public Response update(@RequestBody List<Integer> list){ |
| | | return service.update(list); |
| | | public Response update(@RequestParam Integer num){ |
| | | return service.update(num); |
| | | } |
| | | @PostMapping("/delete") |
| | | |
| | | @PostMapping("/updatePro") |
| | | @ApiOperation(value = "批量确认告警",notes = "num") |
| | | public Response updatePro(@RequestBody List<Integer> list){ |
| | | return service.updatePro(list); |
| | | } |
| | | @GetMapping("/delete") |
| | | @ApiOperation(value = "删除告警",notes = "num") |
| | | public Response delete(@RequestBody List<Integer> list) { |
| | | return service.delete(list); |
| | | public Response delete(@RequestParam Integer num){ |
| | | return service.delete(num); |
| | | } |
| | | @PostMapping("/deletePro") |
| | | @ApiOperation(value = "批量删除告警",notes = "num") |
| | | public Response deletePro(@RequestBody List<Integer> list) { |
| | | return service.deletePro(list); |
| | | } |
| | | @PostMapping("/serchGood") |
| | | @ApiOperation(value = "电池单体健康率") |
| | |
| | | return service.serchGood(uId); |
| | | } |
| | | |
| | | @GetMapping("/getCount") |
| | | @ApiOperation(value = "获取机房实时告警总数",notes = "根据机房信息查询该机房实时告警已确认总数和未确认总数") |
| | | public List<BattalarmData> getCount(@RequestParam String stationId){ |
| | | return service.getCountByStationId(stationId); |
| | | } |
| | | |
| | | @GetMapping("/getRealAlarm") |
| | | @ApiOperation(value = "获取底部电池告警",notes = "项目下方的滚动,查询最新电池告警(电池告警和设备告警筛选出最新的五条)") |
| | | public Response getRealAlarm(){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | return service.getRealAlarm(userInf.getUId().intValue(), null); |
| | | } |
| | | |
| | | |
| | | |
| | | } |