| | |
| | | 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("getBattAlarm") |
| | |
| | | Response res=service.cancleAlarm(num); |
| | | return res; |
| | | } |
| | | |
| | | @ApiOperation("查询电池组历史时间告警") |
| | | @GetMapping("getHisAlatm") |
| | | public Response getHisAlatm(@RequestParam int binfId,@RequestParam String startTime,@RequestParam String endTime |
| | | , @RequestParam int pageNum, @RequestParam int pageSize) throws ParseException, InterruptedException { |
| | | Response res=hisService.getHisAlatm(binfId,startTime,endTime,pageNum,pageSize); |
| | | return res; |
| | | } |
| | | } |