Ver código fonte

移植智能检修首页接口

shilin 3 anos atrás
pai
commit
c02076a7dd

+ 25 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/controller/alarm/AlarmController.java

@@ -148,4 +148,29 @@ public class AlarmController {
 
         return ajax;
     }
+
+
+    @GetMapping(value = "/getAlarmAllTotal")
+    @ResponseBody
+    @ApiOperation(value = "查询报警统计", notes = "查询报警统计")
+    public AjaxResult  getAlarmAllTotal(
+            @RequestParam(value = "stId", required = true)   String stId
+    ) throws Exception {
+
+        AjaxResult ajax=alarmService.getAlarmAllTotal(stId);
+
+        return ajax;
+    }
+
+    @GetMapping(value = "/getShutdownAllTotal")
+    @ResponseBody
+    @ApiOperation(value = "查询故障统计", notes = "查询故障统计")
+    public AjaxResult  getShutdownAllTotal(
+            @RequestParam(value = "stId", required = true)   String stId
+    ) throws Exception {
+
+        AjaxResult ajax=alarmService.getShutdownAllTotal(stId);
+
+        return ajax;
+    }
 }

+ 52 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/controller/health/HealthController.java

@@ -458,4 +458,56 @@ public class HealthController {
         return ajax;
     }
     /***********************************************************************************************************************/
+    @GetMapping("/radar/gzfx")
+    @ResponseBody
+    @ApiOperation(value = "故障分析雷达图", notes = "故障分析雷达图")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "stationid", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "date", value = "日期", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult gzfx(@RequestParam(value = "stationid", required = true) String stationid,
+                           @RequestParam(value = "date", required = true) String date) {
+        AjaxResult ajax=healthMainService.gzfx(stationid,date);
+
+        return ajax;
+    }
+    /***********************************************************************************************************************/
+    @GetMapping("/radar/yjfx")
+    @ResponseBody
+    @ApiImplicitParams({ @ApiImplicitParam(name = "stationid", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "date", value = "日期", required = true, dataType = "string", paramType = "query")})
+    @ApiOperation(value = "预警分析雷达图", notes = "预警分析雷达图")
+    public AjaxResult yjfx(@RequestParam(value = "stationid", required = true) String stationid,
+                           @RequestParam(value = "date", required = true) String date){
+
+        AjaxResult ajax=healthMainService.yjfx(stationid,date);
+
+        return ajax;
+    }
+    /***********************************************************************************************************************/
+    @GetMapping("/analysis/detail")
+    @ResponseBody
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "station", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "name", value = "名称", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "startTs", value = "开始时间", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "endTs", value = "结束时间", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "interval", value = "间隔", required = true, dataType = "string", paramType = "query")
+    })
+    @ApiOperation(value = "详细分析", notes = "详细分析")
+    public AjaxResult detail(   @RequestParam(name = "station") String station,
+                                @RequestParam(name = "wtId") String wtId,
+                                @RequestParam(name = "name") String name,
+                                @RequestParam(name = "startTs") long startTs,
+                                @RequestParam(name = "endTs") long endTs,
+                                @RequestParam(name = "interval", required = false) Integer interval){
+
+        AjaxResult ajax=healthMainService.detail(station,wtId,name,startTs,endTs,interval);
+
+        return ajax;
+    }
+    /***********************************************************************************************************************/
+
+
+
+
 }

+ 53 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/controller/reliability/ReliabilityController.java

@@ -109,4 +109,57 @@ public class ReliabilityController {
         return ajax;
     }
 
+
+    @PostMapping(value = "/poline" )
+    @ResponseBody
+    @ApiOperation(value = "获得单机性能总览列表信息", notes = "获得单机性能总览列表信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "vendor", value = "卖主", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "warehouse", value = "仓库", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "ponum", 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 selectPolinePageList(Tablepar tablepar,
+                                           @RequestParam(value = "vendor", required = false) String vendor,
+                                           @RequestParam(value = "warehouse", required = false) String warehouse,
+                                           @RequestParam(value = "ponum", required = false) String ponum,
+                                           @RequestParam(value = "starttime", required = false) String starttime,
+                                           @RequestParam(value = "endtime",required = false)String endtime)  {
+
+        AjaxResult ajax=reliabilityService.selectPolinePageList(tablepar, vendor, warehouse, ponum, starttime, endtime);
+
+        return ajax;
+    }
+
+
+    @GetMapping("/equupdatecount")
+    @ResponseBody
+    @ApiOperation(value = "获得检修记录信息", notes = "获得检修记录信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "stId", value = "风场编号", required = true, dataType = "string", paramType = "query")
+    })
+
+    public AjaxResult equupdatecount(@RequestParam("stId") String stId)  {
+
+        AjaxResult ajax=reliabilityService.equupdatecount(stId);
+
+        return ajax;
+    }
+
+    @GetMapping("/groupcount")
+    @ResponseBody
+    @ApiOperation(value = "获得库存记录信息", notes = "获得库存记录信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "stId", value = "风场编号", required = true, dataType = "string", paramType = "query")
+    })
+
+    public AjaxResult groupcount(@RequestParam("stId") String stId)  {
+
+        AjaxResult ajax=reliabilityService.groupcount(stId);
+
+        return ajax;
+    }
+
 }

+ 9 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/alarm/AlarmServiceFallbackFactory.java

@@ -63,6 +63,15 @@ public class AlarmServiceFallbackFactory implements FallbackFactory<AlarmService
             return AjaxResult.error(throwable.getMessage());
         }
 
+        @Override
+        public AjaxResult  getAlarmAllTotal( @RequestParam(value = "stId", required = true)   String stId)throws Exception{
+            return AjaxResult.error(throwable.getMessage());
+        }
+            @Override
+        public AjaxResult  getShutdownAllTotal( @RequestParam(value = "stId", required = true)   String stId)throws Exception{
+                return AjaxResult.error(throwable.getMessage());
+            }
+
         };
     }
 }

+ 23 - 1
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/health/HealthServiceFallbackFactory.java

@@ -195,7 +195,29 @@ public class HealthServiceFallbackFactory implements FallbackFactory<HealthServi
 
       /***********************************************************************************************************************/
 
-
+    /**故障分析雷达图**/
+    @Override
+    public AjaxResult gzfx(@RequestParam(value = "stationid", required = true) String stationid,
+                           @RequestParam(value = "date", required = true) String date){
+        return  AjaxResult.error(throwable.getMessage());
+    }
+    /***********************************************************************************************************************/
+    /**预警分析雷达图**/
+    @Override
+    public AjaxResult yjfx(@RequestParam(value = "stationid", required = true) String stationid,
+                           @RequestParam(value = "date", required = true) String date) {
+        return  AjaxResult.error(throwable.getMessage());
+    }
+            /***********************************************************************************************************************/
+            @Override
+            public AjaxResult detail(   @RequestParam(name = "station") String station,
+                                        @RequestParam(name = "wtId") String wtId,
+                                        @RequestParam(name = "name") String name,
+                                        @RequestParam(name = "startTs") long startTs,
+                                        @RequestParam(name = "endTs") long endTs,
+                                        @RequestParam(name = "interval", required = false)  Integer interval) {
+                return  AjaxResult.error(throwable.getMessage());
+            }
         };
     }
 }

+ 20 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/reliability/ReliabilityServiceFallbackFactory.java

@@ -4,6 +4,7 @@ import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.model.Tablepar;
 import com.gyee.consumer.service.reliability.ReliabilityService;
 import feign.hystrix.FallbackFactory;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
 public class ReliabilityServiceFallbackFactory implements FallbackFactory<ReliabilityService> {
@@ -42,6 +43,25 @@ public class ReliabilityServiceFallbackFactory implements FallbackFactory<Reliab
             public AjaxResult companies(){
                 return  AjaxResult.error(throwable.getMessage());
             }
+
+            @Override
+            public AjaxResult selectPolinePageList(@RequestBody Tablepar tablepar,
+                                                   @RequestParam(value = "vendor", required = false) String vendor,
+                                                   @RequestParam(value = "warehouse", required = false) String warehouse,
+                                                   @RequestParam(value = "ponum", required = false) String ponum,
+                                                   @RequestParam(value = "starttime", required = false) String starttime,
+                                                   @RequestParam(value = "endtime",required = false)String endtime){
+                return  AjaxResult.error(throwable.getMessage());
+            }
+
+            public AjaxResult equupdatecount(@RequestParam("stId") String stId){
+                return  AjaxResult.error(throwable.getMessage());
+            }
+
+            @Override
+            public AjaxResult groupcount(@RequestParam("stId") String stId){
+                return  AjaxResult.error(throwable.getMessage());
+            }
         };
     }
 }

+ 20 - 13
web/consumer-hb/src/main/java/com/gyee/consumer/service/alarm/AlarmService.java

@@ -16,12 +16,12 @@ import java.text.ParseException;
 public interface AlarmService {
 
     @GetMapping("/alarm/count/query/new2")
-    public AjaxResult querynew2(@RequestParam(value = "stationid", required = true)   String stationid,
+    public AjaxResult querynew2(@RequestParam(value = "stationid", required = true) String stationid,
                                 @RequestParam(value = "startdate", required = true) String startdate,
                                 @RequestParam(value = "enddate", required = true) String enddate) throws ParseException;
 
     @GetMapping("/shutdown/list")
-    public AjaxResult  getRecentFault(
+    public AjaxResult getRecentFault(
             @RequestParam(value = "stId", required = true) String stId,
             @RequestParam(value = "startDate", required = true) String startDate,
             @RequestParam(value = "endDate", required = true) String endDate) throws Exception;
@@ -29,17 +29,17 @@ public interface AlarmService {
 
     @GetMapping("/alarm/history/page2")
     public AjaxResult queryByPage(
-            @RequestParam(value = "pagenum")Integer pagenum,
-            @RequestParam(value = "pagesize")Integer pagesize,
+            @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 = "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
     );
@@ -58,5 +58,12 @@ public interface AlarmService {
      * 查询停机类型
      */
     @GetMapping(value = "/Stoptype/treeType")
-    public AjaxResult  getRecentFault()throws Exception;
+    public AjaxResult getRecentFault() throws Exception;
+
+    @GetMapping(value = "/alarm/count/query/alltotal")
+    public AjaxResult getAlarmAllTotal(@RequestParam(value = "stId", required = true) String stId) throws Exception;
+
+
+    @GetMapping(value = "/shutdown/count/alltotal")
+    public AjaxResult getShutdownAllTotal(@RequestParam(value = "stId", required = true) String stId) throws Exception;
 }

+ 18 - 2
web/consumer-hb/src/main/java/com/gyee/consumer/service/health/HealthService.java

@@ -132,9 +132,25 @@ public interface HealthService {
     @GetMapping("/wtHealthList/windTurbineHealthList")
     public AjaxResult windTurbineHealthList(@RequestParam("wpId") String wpId) throws Exception;
     /***********************************************************************************************************************/
-    /**风机健康列表**/
+    /**仓库列表**/
     @GetMapping("/ticket/warehouse")
     public AjaxResult warehouse() throws Exception ;
     /***********************************************************************************************************************/
-
+    /**故障分析雷达图**/
+    @GetMapping("/radar/gzfx")
+    public AjaxResult gzfx(@RequestParam(value = "stationid", required = true) String stationid,
+                           @RequestParam(value = "date", required = true) String date);
+    /***********************************************************************************************************************/
+    /**预警分析雷达图**/
+    @GetMapping("/radar/yjfx")
+    public AjaxResult yjfx(@RequestParam(value = "stationid", required = true) String stationid,
+                           @RequestParam(value = "date", required = true) String date);
+    /***********************************************************************************************************************/
+    @GetMapping("/analysis/detail")
+    public AjaxResult detail(   @RequestParam(name = "station") String station,
+                                @RequestParam(name = "wtId") String wtId,
+                                @RequestParam(name = "name") String name,
+                                @RequestParam(name = "startTs") long startTs,
+                                @RequestParam(name = "endTs") long endTs,
+                                @RequestParam(name = "interval", required = false) Integer interval);
 }

+ 15 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/service/reliability/ReliabilityService.java

@@ -38,4 +38,19 @@ public interface ReliabilityService {
 
     @GetMapping("/ticket/companies")
     public AjaxResult companies();
+
+    @PostMapping(value = "/ticket/selectPolinePageList" )
+    public AjaxResult selectPolinePageList(@RequestBody Tablepar tablepar,
+                                           @RequestParam(value = "vendor", required = false) String vendor,
+                                           @RequestParam(value = "warehouse", required = false) String warehouse,
+                                           @RequestParam(value = "ponum", required = false) String ponum,
+                                           @RequestParam(value = "starttime", required = false) String starttime,
+                                           @RequestParam(value = "endtime",required = false)String endtime);
+
+
+    @GetMapping("/ticket/equupdatecount")
+    public AjaxResult equupdatecount(@RequestParam("stId") String stId);
+
+    @GetMapping("/ticket/groupcount")
+    public AjaxResult groupcount(@RequestParam("stId") String stId);
 }