Browse Source

优化后台计算算法

shilin 1 year ago
parent
commit
e5be0d2b7a

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

@@ -920,4 +920,79 @@ public class HealthController {
         return ajax;
 
     }
+
+
+    /**
+     * 通过线路ID获取风机下拉接口
+     *
+     * @return
+     */
+    @GetMapping("/getParttemperaturesubListByWpId")
+    @ResponseBody
+    @ApiOperation(value = "按部件获取温度列表", notes = "按部件获取温度列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "partId", value = "部件(发电机 fdj,齿轮箱 clx,变桨 bj,主控 zk)", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult getParttemperaturesubListByWpId(@RequestParam("wpId") String wpId, @RequestParam("recorddate") String recorddate,@RequestParam("partId")  String partId) throws Exception {
+        AjaxResult ajax = healthMainService.getParttemperaturesubListByWpId(wpId,recorddate,partId);
+
+        return ajax;
+
+    }
+
+    /**
+     * 通过线路ID获取风机下拉接口
+     *
+     * @return
+     */
+    @GetMapping("/getProEconPartPowerStatticsSubListByWpId")
+    @ResponseBody
+    @ApiOperation(value = "按部件获取功率列表", notes = "按部件获取功率列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "partId", value = "部件(发电机 fdj,齿轮箱 clx,变桨 bj,主控 zk)", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult getProEconPartPowerStatticsSubListByWpId(@RequestParam("wpId") String wpId, @RequestParam("recorddate") String recorddate,@RequestParam("partId")  String partId) throws Exception {
+        AjaxResult ajax = healthMainService.getProEconPartPowerStatticsSubListByWpId(wpId,recorddate,partId);
+
+        return ajax;
+
+    }
+
+    /**
+     * 故障评判列表
+     * @return
+     */
+    @GetMapping("/getFailureStatisticMainListByWpId")
+    @ResponseBody
+    @ApiOperation(value = "故障评判列表", notes = "故障评判列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult getFailureStatisticMainListByWpId(String wpId, String recorddate) throws Exception {
+
+        AjaxResult ajax = healthMainService.getFailureStatisticMainListByWpId(wpId,recorddate);
+
+        return ajax;
+
+    }
+
+    /**
+     * 预警评判列表
+     * @return
+     */
+    @GetMapping("/getEarlyWarningMainListByWpId")
+    @ResponseBody
+    @ApiOperation(value = "预警评判列表", notes = "预警评判列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult getEarlyWarningMainListByWpId(String wpId, String recorddate) throws Exception {
+
+        AjaxResult ajax = healthMainService.getEarlyWarningMainListByWpId(wpId,recorddate);
+
+        return ajax;
+
+    }
 }

+ 3 - 3
web/consumer-hb/src/main/java/com/gyee/consumer/controller/scatter/ScatterController.java

@@ -70,11 +70,11 @@ public class ScatterController {
     @ApiOperation(value = "风向图表", notes = "风向图表")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
-            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+            @ApiImplicitParam(name = "recordDate", value = "日期", required = true, dataType = "string", paramType = "query")})
 
-    public AjaxResult getWinddirection(@RequestParam("wpId") String wpId,@RequestParam("recorddate")  String recorddate) throws Exception {
+    public AjaxResult getWinddirection(@RequestParam("wpId") String wpId,@RequestParam("recordDate")  String recordDate) throws Exception {
 
-        AjaxResult ajax=scatterService.getWinddirection(wpId, recorddate);
+        AjaxResult ajax=scatterService.getWinddirection(wpId, recordDate);
 
         return ajax;
     }

+ 18 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/health/HealthServiceFallbackFactory.java

@@ -350,6 +350,24 @@ public class HealthServiceFallbackFactory implements FallbackFactory<HealthServi
             public AjaxResult windturbineByLnIdAjax( String lnId) throws Exception {
                 return AjaxResult.error(throwable.getMessage());
             }
+            @Override
+            public AjaxResult getParttemperaturesubListByWpId(String wpId, String recorddate,String partId) throws Exception{
+                return AjaxResult.error(throwable.getMessage());
+            }
+            @Override
+            public AjaxResult getProEconPartPowerStatticsSubListByWpId(@RequestParam("wpId") String wpId, @RequestParam("recorddate") String recorddate, @RequestParam("partId") String partId) throws Exception{
+                return AjaxResult.error(throwable.getMessage());
+            }
+            @Override
+            public AjaxResult getFailureStatisticMainListByWpId(@RequestParam("wpId") String wpId,@RequestParam("recorddate")  String recorddate) throws Exception{
+                return AjaxResult.error(throwable.getMessage());
+            }
+
+            @Override
+            public AjaxResult getEarlyWarningMainListByWpId(@RequestParam("wpId") String wpId,@RequestParam("recorddate")  String recorddate) throws Exception{
+                return AjaxResult.error(throwable.getMessage());
+            }
+
         };
     }
 }

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

@@ -250,20 +250,35 @@ public interface HealthService {
     public AjaxResult windfarmAjax();
 
     @GetMapping("/healthmain/projectAjax")
-    public AjaxResult projectAjax(@RequestParam("wpIds")  String wpIds);
+    public AjaxResult projectAjax(@RequestParam("wpIds") String wpIds);
 
     @GetMapping("/healthmain/projectAllAjax")
 
     public AjaxResult projectAllAjax();
 
     @GetMapping("/healthmain/lineAjax")
-    public AjaxResult lineAjax(@RequestParam("pjIds")  String pjIds);
+    public AjaxResult lineAjax(@RequestParam("pjIds") String pjIds);
 
     @GetMapping("/healthmain/windturbineAjax")
     public AjaxResult windturbineAjax(@RequestParam("wpId") String wpId);
 
     @GetMapping("/healthmain/windturbineByPjIdAjax")
     public AjaxResult windturbineByPjIdAjax(@RequestParam("pjId") String pjId);
+
     @GetMapping("/healthmain/windturbineByLnIdAjax")
-    public AjaxResult windturbineByLnIdAjax(@RequestParam("lnId") String lnId) throws Exception ;
+    public AjaxResult windturbineByLnIdAjax(@RequestParam("lnId") String lnId) throws Exception;
+
+    /*********************************************************************************************/
+    @GetMapping("/report/getParttemperaturesubListByWpId")
+    public AjaxResult getParttemperaturesubListByWpId(@RequestParam("wpId") String wpId, @RequestParam("recorddate") String recorddate, @RequestParam("partId") String partId) throws Exception;
+
+    @GetMapping("/report/getProEconPartPowerStatticsSubListByWpId")
+    public AjaxResult getProEconPartPowerStatticsSubListByWpId(@RequestParam("wpId") String wpId, @RequestParam("recorddate") String recorddate, @RequestParam("partId") String partId) throws Exception;
+
+    @GetMapping("/report/getFailureStatisticMainListByWpId")
+    public AjaxResult getFailureStatisticMainListByWpId(@RequestParam("wpId") String wpId,@RequestParam("recorddate")  String recorddate) throws Exception;
+
+    @GetMapping("/report/getEarlyWarningMainListByWpId")
+    public AjaxResult getEarlyWarningMainListByWpId(@RequestParam("wpId") String wpId,@RequestParam("recorddate")  String recorddate) throws Exception;
+
 }

+ 1 - 1
web/consumer-hb/src/main/java/com/gyee/consumer/service/scatter/ScatterService.java

@@ -31,5 +31,5 @@ public interface ScatterService {
     /***********************************************************************************************************************/
 
     @GetMapping("/winddirection/getWinddirection")
-    public AjaxResult getWinddirection(@RequestParam("wpId") String wpId,@RequestParam("recorddate")  String recorddate) throws Exception;
+    public AjaxResult getWinddirection(@RequestParam("wpId") String wpId,@RequestParam("recordDate")  String recordDate) throws Exception;
 }

+ 2 - 2
web/consumer-hb/src/main/resources/application-jn.yml

@@ -104,14 +104,14 @@ feign:
 provider:
 #  monitorurl: http://10.81.3.155:8171/
 #  healthurl: http://10.81.3.155:8172/
-#  analysisurl: http://10.81.3.155:8171/
+#  analysisurl: http://10.81.3.155:8172/
 #  adminurl: http://10.81.3.155:8171/
 #  alarmurl: http://10.81.3.155:8176/
 #  peranalyurl: http://10.81.3.155:8171/
 
   monitorurl: http://127.0.0.1:8171/
   healthurl: http://127.0.0.1:8172/
-  analysisurl: http://127.0.0.1:8171/
+  analysisurl: http://127.0.0.1:8172/
   adminurl: http://127.0.0.1:8171/
   alarmurl: http://127.0.0.1:8176/
   peranalyurl: http://127.0.0.1:8171/