whyclxw
2024-07-30 ed04733e15a5304c68ac16c121fd2989c851a57b
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.PwrdevAlarmHistory;
import com.whyc.service.PwrdevAlarmHistoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.text.ParseException;
import java.util.List;
 
 
@Api(tags = "告警管理-电源历史告警")
@RestController
@RequestMapping("PwrdevAlarmHistoryAction")
public class PwrdevAlarmHistoryController extends BaseController{
 
    @Autowired
    private PwrdevAlarmHistoryService service;
 
    //电源历史告警查询
    @ApiOperation(value = "电源历史告警查询",notes = "almTypes,almSource,almStartTime,almStartTime1,pageCurr,pageSize,usrId,stationName1,stationName2,stationName3,stationName5")
    @PostMapping("/getHistoryAllPage")
    public Response getHistoryAllPage(@RequestBody PwrdevAlarmHistory param) throws ParseException {
        //return service.getHistoryAllPage(pwrH);
        return service.getPageInfo(param);
    }
 
    @PostMapping("levelList")
    @ApiOperation(value = "电源告警历史记录查询-告警等级分类统计")
    public Response getLevelList(@RequestBody List<Integer> almTypes) throws ParseException {
        //return service.serchByInfo(par);
        return service.getLevelList(almTypes);
    }
 
    //电池历史告警删除
    @ApiOperation(value = "电源历史告警删除---通讯电源")
    @GetMapping("delete")
    public Response delete(@RequestParam int num){
        return service.delete(num);
    }
    //电池历史告警删除批量
    @ApiOperation(value = "电源历史告警删除批量---通讯电源")
    @PostMapping("deletepro")
    public Response deletepro(@RequestBody List<Integer> list){
        return service.deletepro(list);
    }
 
    //通讯电源历史告警查询
    @ApiOperation(value = "通讯电源历史告警查询",notes = "almTypes,almSource,almStartTime,almStartTime1,pageCurr,pageSize,usrId,stationName1,stationName2,stationName3,stationName5")
    @PostMapping("/getHistoryAllPage2")
    public Response getHistoryAllPage2(@RequestBody PwrdevAlarmHistory param) throws ParseException {
        //return service.getHistoryAllPage2(pwrH);
        return service.getPageInfoForTX(param);
    }
 
}