| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.service.BattAlarmHisService; |
| | | import com.whyc.service.BattAlarmService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.text.ParseException; |
| | | |
| | | |
| | | @RestController |
| | | @Api(tags = "电池实时告警") |
| | |
| | | public class BattAlarmController { |
| | | @Autowired |
| | | private BattAlarmService service; |
| | | |
| | | @Autowired |
| | | private BattAlarmHisService hisService; |
| | | |
| | | @ApiOperation("在用电池组实时推送告警信息") |
| | | @GetMapping("getResBattAlm") |
| | | public Response getResBattAlm(@RequestParam(required = false) int binfId){ |
| | | Response res=service.getResBattAlm(binfId); |
| | | return res; |
| | | } |
| | | |
| | | @ApiOperation("查询电池告警") |
| | | @GetMapping("getBattAlarm") |
| | |
| | | Response res=service.cancleAlarm(num); |
| | | return res; |
| | | } |
| | | |
| | | @ApiOperation("查询电池组历史时间告警") |
| | | @GetMapping("getHisAlarm") |
| | | public Response getHisAlarm(@RequestParam int binfId,@RequestParam String startTime,@RequestParam String endTime |
| | | , @RequestParam int pageNum, @RequestParam int pageSize) throws ParseException, InterruptedException { |
| | | Response res=hisService.getHisAlarm(binfId,startTime,endTime,pageNum,pageSize); |
| | | return res; |
| | | } |
| | | } |