|
@@ -0,0 +1,151 @@
|
|
|
+package com.gyee.consumer.controller.alarm;
|
|
|
+
|
|
|
+import com.gyee.common.domain.AjaxResult;
|
|
|
+import com.gyee.consumer.service.alarm.AlarmService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.text.ParseException;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : AlarmController
|
|
|
+ * @Description : 报警管理消费
|
|
|
+ */
|
|
|
+@Controller
|
|
|
+@RequestMapping("/alarm")
|
|
|
+@Api(value = "报警管理信息",tags = "报警管理信息")
|
|
|
+public class AlarmController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private AlarmService alarmService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 预警分析
|
|
|
+ */
|
|
|
+ @GetMapping("/findEarlyWarningAnalysis")
|
|
|
+ @ResponseBody
|
|
|
+ @ApiOperation(value = "查询预警分析信息", notes = "查询预警分析信息")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "stationid", value = "风场站编号", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "startdate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "enddate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
|
|
|
+ public AjaxResult findEarlyWarningAnalysis(
|
|
|
+ @RequestParam(value = "stationid", required = true) String stationid,
|
|
|
+ @RequestParam(value = "startdate", required = true) String startdate,
|
|
|
+ @RequestParam(value = "enddate", required = true) String enddate
|
|
|
+ ) throws ParseException {
|
|
|
+
|
|
|
+ AjaxResult ajax=alarmService.querynew2(stationid,startdate,enddate);
|
|
|
+
|
|
|
+ return ajax;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 故障分析
|
|
|
+ */
|
|
|
+ @GetMapping("/findRecentFault")
|
|
|
+ @ResponseBody
|
|
|
+ @ApiOperation(value = "查询故障分析信息", notes = "查询故障分析信息")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "stId", value = "风场站编号", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "startdate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "enddate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
|
|
|
+ public AjaxResult findRecentFault(
|
|
|
+ @RequestParam(value = "stId", required = true) String stId,
|
|
|
+ @RequestParam(value = "startDate", required = true) String endDate,
|
|
|
+ @RequestParam(value = "endDate", required = true) String startDate
|
|
|
+
|
|
|
+ )throws Exception {
|
|
|
+
|
|
|
+
|
|
|
+ AjaxResult ajax=alarmService.getRecentFault(stId,startDate,endDate);
|
|
|
+
|
|
|
+ return ajax;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 预警分析
|
|
|
+ */
|
|
|
+ @GetMapping("/findWarningHistory")
|
|
|
+ @ResponseBody
|
|
|
+ @ApiOperation(value = "查询预警分析信息", notes = "查询预警分析信息")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "pagenum", value = "页号", required = true, dataType = "Integer", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "pagesize", value = "每页显示内容", required = true, dataType = "Integer", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "stationid", value = "风场站编号", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "windturbineid", value = "风机编号", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "category1", value = "分类1", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "category2", value = "分类2", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "rank", value = "排名", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "modelid", value = "型号编号", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "snapid", value = "快照编号", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "messagetype", value = "信息类型", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "keyword", value = "关键字", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "starttime", value = "开始时间", required = true, dataType = "string", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "endtime", value = "结束时间", required = true, dataType = "string", paramType = "query")
|
|
|
+ })
|
|
|
+ public AjaxResult findWarningHistory(
|
|
|
+ @RequestParam(value = "pagenum")Integer pagenum,
|
|
|
+ @RequestParam(value = "pagesize")Integer pagesize,
|
|
|
+ @RequestParam(value = "stationid", required = false) String stationid,
|
|
|
+ @RequestParam(value = "windturbineid",required = false) String windturbineid,
|
|
|
+ @RequestParam(value = "category1",required = false) String category1,
|
|
|
+ @RequestParam(value = "category2",required = false) String category2,
|
|
|
+ @RequestParam(value = "rank",required = false) String rank,
|
|
|
+ @RequestParam(value = "modelid",required = false) String modelid,
|
|
|
+ @RequestParam(value = "snapid",required = false) Long snapid,
|
|
|
+ @RequestParam(value = "messagetype",required = false) Integer messagetype,
|
|
|
+ @RequestParam(value = "keyword",required = false) String keyword,
|
|
|
+ @RequestParam(value = "starttime", required = false) String starttime,
|
|
|
+ @RequestParam(value = "endtime", required = false) String endtime
|
|
|
+ ){
|
|
|
+ AjaxResult ajax=alarmService.queryByPage(pagenum,pagesize,stationid,windturbineid,category1,category2,rank,modelid,snapid,messagetype,keyword,starttime,endtime);
|
|
|
+
|
|
|
+ return ajax;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 自定义报警统计
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/findCustomAlarmStatistics")
|
|
|
+ @ResponseBody
|
|
|
+ @ApiOperation(value = "查询自定义报警统计", notes = "查询自定义报警统计")
|
|
|
+ public AjaxResult findCustomAlarmStatistics(
|
|
|
+ @RequestParam(value = "stationid", required = true) String stationid,
|
|
|
+ @RequestParam(value = "datebegin", required = true) String datebegin,
|
|
|
+ @RequestParam(value = "dateend", required = true) String dateend,
|
|
|
+ @RequestParam(value = "windturbineid", required = false) String windturbineid
|
|
|
+ ) throws ParseException {
|
|
|
+
|
|
|
+ AjaxResult ajax=alarmService.query2(stationid,datebegin,dateend,windturbineid);
|
|
|
+
|
|
|
+ return ajax;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询停机类型
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/treeType")
|
|
|
+ @ResponseBody
|
|
|
+ @ApiOperation(value = "查询停机类型", notes = "查询停机类型")
|
|
|
+ public AjaxResult getRecentFault()throws Exception {
|
|
|
+
|
|
|
+ AjaxResult ajax=alarmService.getRecentFault();
|
|
|
+
|
|
|
+ return ajax;
|
|
|
+ }
|
|
|
+}
|