whyclxw
2025-05-28 e16302f9d475c7cc4dd18c5abf1a23cb5502e362
src/main/java/com/whyc/controller/PwrdevAlarmHistoryController.java
@@ -6,18 +6,16 @@
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 org.springframework.web.bind.annotation.*;
import java.text.ParseException;
import java.util.List;
@Api(tags = "电源告警-历史告警")
@Api(tags = "告警管理-电源历史告警")
@RestController
@RequestMapping("/PwrdevAlarmHistoryAction")
public class PwrdevAlarmHistoryController {
@RequestMapping("PwrdevAlarmHistoryAction")
public class PwrdevAlarmHistoryController extends BaseController{
    @Autowired
    private PwrdevAlarmHistoryService service;
@@ -25,8 +23,37 @@
    //电源历史告警查询
    @ApiOperation(value = "电源历史告警查询",notes = "almTypes,almSource,almStartTime,almStartTime1,pageCurr,pageSize,usrId,stationName1,stationName2,stationName3,stationName5")
    @PostMapping("/getHistoryAllPage")
    public Response getHistoryAllPage(@RequestBody PwrdevAlarmHistory pwrH){
        return service.getHistoryAllPage(pwrH);
    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);
    }
}