whycxzp
2024-04-07 934de4748087b652625a61c4788848a8bc659806
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.whyc.controller;
 
import com.whyc.dto.DevAlarmHisDto;
import com.whyc.dto.Response;
import com.whyc.pojo.db_ckpwrdev_alarm.CKPowerDevAlarm;
import com.whyc.pojo.db_ckpwrdev_alarm.CKPowerDevAlarmHistory;
import com.whyc.service.CKPowerDevAlarmHistoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.text.ParseException;
 
@RestController
@Api(tags = "测控电源历史告警")
@RequestMapping("ckPowerDevAlarmHistory")
public class CKPowerDevAlarmHistoryController {
 
    @Autowired
    private CKPowerDevAlarmHistoryService service;
 
    @PostMapping("getPage")
    @ApiOperation("分页查询")
    public Response getPage(@RequestBody DevAlarmHisDto alarmDto) throws ParseException {
        return service.getPage(alarmDto);
    }
 
    @PostMapping("getCountByLevel")
    @ApiOperation("头部统计")
    public Response getCountByLevel() throws InterruptedException {
        return service.getCountByLevel();
    }
}