whyclxw
2024-06-15 7b269be1ccc6c738b4ffe9416004e09c6fd8e9c6
src/main/java/com/whyc/controller/BattAlarmController.java
@@ -1,6 +1,7 @@
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;
@@ -10,6 +11,8 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException;
@RestController
@Api(tags = "电池实时告警")
@@ -17,6 +20,9 @@
public class BattAlarmController {
    @Autowired
    private BattAlarmService service;
    @Autowired
    private BattAlarmHisService hisService;
    @ApiOperation("查询电池告警")
    @GetMapping("getBattAlarm")
@@ -38,4 +44,12 @@
        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;
    }
}