xushili пре 1 дан
родитељ
комит
fcce8ac553

+ 5 - 1
dao/dao-sql/src/main/java/com/gyee/wisdom/dao/sql/things/JpaThingsPointDao.java

@@ -39,7 +39,11 @@ public class JpaThingsPointDao implements IThingsPointDao {
 
     @Override
     public List<TsPoint> findTsPointByUnformCodes(String thingType, String thingId, String... uCodes) {
-        return DataUtil.convertDataList(tsPointRepository.findAllByThingTypeAndThingIdAndUniformCodeIn(thingType, thingId, uCodes));
+        if("".equals(uCodes[0])){
+            return DataUtil.convertDataList(tsPointRepository.findAllByThingTypeAndThingId(thingType, thingId));
+        }else {
+            return DataUtil.convertDataList(tsPointRepository.findAllByThingTypeAndThingIdAndUniformCodeIn(thingType, thingId, uCodes));
+        }
     }
 
     @Override

+ 141 - 0
data-adapter/src/main/resources/application-hwy.yaml

@@ -0,0 +1,141 @@
+server:
+  port: 8011
+  max-http-header-size: 128KB
+
+
+spring:
+  application:
+    name: data-adapter
+  jpa:
+    show-sql: false
+  cache:
+    type: SIMPLE
+  datasource:
+    driver-class-name: org.postgresql.Driver
+    url: jdbc:postgresql://123.60.219.66:5432/early_warning
+    username: postgres
+    password: gyeepd@123
+    type: com.alibaba.druid.pool.DruidDataSource
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+#  redis:
+#    database: 2
+#    host: 192.168.2.5
+#    password:
+#    port: 6379
+#    timeout: 60000
+#    jedis:
+#      pool:
+#        maxTotal: 20
+#        maxIdle: 20
+#        maxwait: 60000
+#        minIdle: 10
+# 此处Key不可改变
+knife4j:
+  redis:
+    # 是否采用json序列化方式,若不采用jackson序列化
+    jsonSerialType: 'Fastjson'
+    host: 10.0.118.76
+    password:
+    port: 6379
+    databases: [ 0 ] # 要使用的库,会根据此处填写的库生成redisTemplate
+    timeout: 60s
+    lettuce: # lettuce基于netty,线程安全,支持并发
+      pool:
+        max-active: 50
+        max-wait: -1ms
+        max-idle: 8
+        min-idle: 0
+  cache:
+    type: Simple
+
+timeseries:
+  db-type: simulator #"${DATABASE_TYPE:sql}" # cassandra/kairosDB/hbase/opentsDB/influxDB/TiDB
+  #db-type: hadoop #"${DATABASE_TYPE:sql}" # cassandra/kairosDB/hbase/opentsDB/influxDB/TiDB
+#golden 数据库信息
+golden:
+  server_ip: 123.60.213.70
+  #server_ip: 172.168.1.3
+  server_port: 6327
+  user_name: sa
+  password: golden
+  pool_size: 10
+  max_pool_size: 100
+  #单次查询历史原始数据的数量上限
+  query_history_limit: 100000
+
+#hadoop数据库信息
+hadoop:
+  #查询上一个值的最多访问次数  2的8次方,增加步长为60分钟,如:t0-60,t0-120,t0-240....
+  lastValueSearch: 8
+  urlMap:
+    DJL: http://192.168.1.61:4242/api/
+    DQ: http://192.168.1.62:4242/api/
+    GF: http://192.168.1.63:4242/api/
+    GGL: http://192.168.1.64:4242/api/
+    FGL: http://192.168.1.66:4242/api/
+    FJ: http://192.168.1.69:4243/api/
+    JSFW: http://192.168.1.67:4242/api/
+    #仅限于查询NSSDQN,NXDQDI,SBQNWDQ,SBQXLDQ
+    DQ2: http://192.168.1.62:10001/api/
+
+#taos数据库
+taos:
+  server_ip: 192.168.2.252
+  server_port: 6030
+  user_name: root
+  password: taosdata
+  pool_size: 10
+  max_pool_size: 100
+
+#适配器链接taos数据库配置信息
+taoscz:
+  server_ip: 123.60.219.66
+  server_port: 6041
+  db_name: jsfw_db
+  user_name: root
+  password: taosdata
+  pool_size: 10
+  max_pool_size: 100
+  driver_type: com.taosdata.jdbc.rs.RestfulDriver
+  #  driver_type: com.taosdata.jdbc.TSDBDriver
+  #taos中ai测点的超级表名
+  di_stable_name: pointdi
+  #taos中di测点的超级表名
+  ai_stable_name: pointci
+
+#EDOS 数据库信息
+edos:
+  server_ip: 192.168.1.100
+  server_port: 10010
+  default_connections: 1
+  incremental_connections: 1
+  max_connections: 10
+# Publish 发布服务配置
+publish:
+  rtdb_scan_interval: 1000
+  publish_interval: 5000
+
+#是否缓存所有风机测点
+isLoadAllTag: true
+#是否启动websocket推送
+websocket_start: false
+#websocket推送风机基本信息统一编码
+uniformcode:
+  wind_speed_code: AI022
+  roll_speed_code: AI128
+  power_code: AI130
+  status_code: FJZT8
+  lock_code: XDSL
+  pv_I: AIG060     #电流-A相
+  pv_U: AIG061     #电压-A相
+  pv_P: AI130      #功率-有功功率
+  pv_statue: FJZT  #状态

+ 2 - 2
data-adapter/src/main/resources/application.yaml

@@ -1,5 +1,5 @@
 server:
-  port: 8012
+  port: 8011
   max-http-header-size: 128KB
   tomcat:
     connection-timeout: 3000
@@ -36,7 +36,7 @@ spring:
           test-on-borrow: false
           test-on-return: false
   profiles:
-    active: nxxnj
+    active: hwy
 #  redis:
 #    database: 2
 #    host: 192.168.2.5

+ 1 - 1
warning-web/src/main/java/com/gyee/wisdom/alarm/sharding/controller/Alertrule2Controller.java

@@ -44,7 +44,7 @@ public class Alertrule2Controller {
     @Autowired
     private Alertrule2Service alertrule2Service;
 
-    @UserLoginToken
+    //@UserLoginToken
     @GetMapping(value = "/list")
     public List<Alertrule2> queryTree() {
         List<Alertrule2> alertrules = alertrule2Service.queryTree();