Browse Source

修改矩阵监视功能

shilin 3 years ago
parent
commit
f95a04dde4

+ 25 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/controller/monitor/MatrixPushController.java

@@ -110,4 +110,29 @@ public class MatrixPushController {
 
         return ajax;
     }
+
+
+    @GetMapping("/findSameIndexList")
+    @ResponseBody
+    @ApiOperation(value = "全风场简单矩阵", notes = "全风场简单矩阵")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult findSameIndexList(@RequestParam("wtId") String wtId) throws Exception{
+
+        AjaxResult ajax=matrixPushService.findSameIndexList(wtId);
+
+        return ajax;
+    }
+
+    @GetMapping("/findSameIndexValueList")
+    @ResponseBody
+    @ApiOperation(value = "获得对应风机相关指标Map集合", notes = "获得对应风机相关指标Map集合")
+    @ApiImplicitParams({@ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "code", value = "指标编号", required = true, dataType = "string", paramType = "query")
+    })
+    public AjaxResult findSameIndexValueList(@RequestParam("wtId")String wtId, @RequestParam("code")String code) throws Exception{
+
+        AjaxResult ajax=matrixPushService.findSameIndexValueList(wtId,code);
+
+        return ajax;
+    }
 }

+ 8 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/monitor/MatrixPushServiceFallbackFactory.java

@@ -51,6 +51,14 @@ public class MatrixPushServiceFallbackFactory implements FallbackFactory<MatrixP
             public AjaxResult findPVSimpleMatrixAll() throws Exception{
                 return  AjaxResult.error(throwable.getMessage());
             }
+            @Override
+            public AjaxResult findSameIndexList(@RequestParam("wtId")String wtId)throws Exception{
+                return  AjaxResult.error(throwable.getMessage());
+            }
+            @Override
+            public AjaxResult findSameIndexValueList(@RequestParam("wtId")String wtId, @RequestParam("code")String code)throws Exception{
+                return  AjaxResult.error(throwable.getMessage());
+            }
         };
     }
 }

+ 6 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/service/monitor/MatrixPushService.java

@@ -36,4 +36,10 @@ public interface MatrixPushService {
 
     @GetMapping("/matrix/findPVSimpleMatrixAll")
       public AjaxResult findPVSimpleMatrixAll() throws Exception;
+
+    @GetMapping("/monitor/findSameIndexList")
+    public AjaxResult findSameIndexList(@RequestParam("wtId")String wtId)throws Exception;
+    @GetMapping("/monitor/findSameIndexValueList")
+    public AjaxResult findSameIndexValueList(@RequestParam("wtId")String wtId, @RequestParam("code")String code)throws Exception;
+
 }

+ 28 - 30
web/consumer-hb/src/main/resources/application.yml

@@ -3,34 +3,20 @@ gyee:
   #API访问ip
   #swaggerip: 10.83.68.97:8170
   #swaggerip: 192.168.56.1:8170
-  swaggerip: 192.168.2.198:8170
+  #swaggerip: 192.168.2.198:8170
+  swaggerip: 10.81.3.155:8170
 server:
   port: 8170
 
 spring:
   application:
     name: monitor-web-hb-consumer
-  cloud:
-    sentinel:
-      transport:
-        dashboard: 192.168.2.198:8849
-        port: 8169
-      datasource:
-        ds1:
-          nacos:
-            server-addr: 192.168.2.198:8848
-            data-id: ${spring.application.name}.json
-            group-id: DEFAULT_GROUP
-            data-type: json
-            rule-type: flow
-      filter:
-        enabled: true
-      eager: true
     nacos:
       discovery:
+        server-addr: 10.81.3.155:8848
         #server-addr: 192.168.56.1:8848
         #server-addr: 10.83.68.97:8848
-        server-addr: 192.168.2.198:8848
+        #server-addr: 192.168.2.198:8848
         #指定yaml格式的配置
         file-extension: yaml
         cluster-name: master
@@ -39,8 +25,9 @@ spring:
   #redis集群
   redis:
     #host: 10.0.118.73
+    host: 10.81.3.155
     #host: 123.60.213.70
-    host: 192.168.2.202
+    #host: 192.168.2.202
     #host: 10.83.68.94
     password:
     port: 6379
@@ -59,21 +46,27 @@ spring:
         min-idle: 0
         max-idle: 8
         max-wait: -1
-    database: 19
+    database: 0
   autoconfigure:
     exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: oracle.jdbc.OracleDriver
+#    driver-class-name: oracle.jdbc.OracleDriver
     #外网
     #url: jdbc:oracle:thin:@10.0.118.71:1521:gdsj
-    #url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
+#    url: jdbc:oracle:thin:@123.60.213.70:1521:gdnxfd
     #url: jdbc:oracle:thin:@10.83.68.165:1521:gdsj
-    url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
-    username: gdprod
-    password: gd123
+    #url: jdbc:oracle:thin:@192.168.2.215:1521:gdsj
+#    username: gdprod
+#    password: gd123
 #    username: nxfdprod
 #    password: gdnxfd123
+
+    url: jdbc:postgresql://10.81.3.151:5432/wisdom
+    username: gdprod
+    password: gd123
+    driver-class-name: org.postgresql.Driver
+
     oracle-schema=:
     druid:
       max-active: 20
@@ -135,11 +128,16 @@ provider:
 #  analysisurl: http://192.168.56.1:8173/
 #  adminurl: http://192.168.56.1:8174/
 #  alarmurl: http://192.168.56.1:8176/
-  monitorurl: http://192.168.2.198:8171/
-  healthurl: http://192.168.2.198:8172/
-  analysisurl: http://192.168.2.198:8173/
-  adminurl: http://192.168.2.198:8174/
-  alarmurl: http://192.168.2.198:8176/
+#  monitorurl: http://192.168.2.198:8171/
+#  healthurl: http://192.168.2.198:8172/
+#  analysisurl: http://192.168.2.198:8173/
+#  adminurl: http://192.168.2.198:8174/
+#  alarmurl: http://192.168.2.198:8176/
+  monitorurl: http://10.81.3.155:8171/
+  healthurl: http://10.81.3.155:8172/
+  analysisurl: http://10.81.3.155:8173/
+  adminurl: http://10.81.3.155:8174/
+  alarmurl: http://10.81.3.155:8176/
 management:
   endpoints:
     jmx: