Commit 807ed8e4 authored by yangyang's avatar yangyang

Merge remote-tracking branch 'origin/developer' into developer

parents 24986b3c 91ac6035
...@@ -39,7 +39,7 @@ public class HandleESMessage2TDService { ...@@ -39,7 +39,7 @@ public class HandleESMessage2TDService {
/** /**
* 十分钟拉取ES数据存入TdEngine * 十分钟拉取ES数据存入TdEngine
*/ */
@Scheduled(cron = "0 */10 * * * ?") @Scheduled(cron = "0 */2 * * * ?")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void syncEsData2TDEngine() throws Exception { public void syncEsData2TDEngine() throws Exception {
SimpleDateFormat format = new SimpleDateFormat(datePattern); SimpleDateFormat format = new SimpleDateFormat(datePattern);
...@@ -56,7 +56,7 @@ public class HandleESMessage2TDService { ...@@ -56,7 +56,7 @@ public class HandleESMessage2TDService {
try { try {
HashMap<String, String> syncFlag = new HashMap<>(); HashMap<String, String> syncFlag = new HashMap<>();
syncFlag.put("sync_flag", "success"); syncFlag.put("sync_flag", "success");
emqKeeper.getMqttClient().publish("sync_esdata_to_tdengine_notice", JSON.toJSONString(syncFlag).getBytes(), 0, false); emqKeeper.getMqttClient().publish("sync_esdata_to_tdengine_notice1", JSON.toJSONString(syncFlag).getBytes(), 0, false);
log.info("同步ES数据至发发送消息给业务发送通知成功!"); log.info("同步ES数据至发发送消息给业务发送通知成功!");
} catch (Exception exception) { } catch (Exception exception) {
log.info("同步ES数据至发发送消息给业务发送通知失败!"); log.info("同步ES数据至发发送消息给业务发送通知失败!");
......
#mysql ??? #mysql ???
spring.datasource.mysql-server.driver-class-name=com.kingbase8.Driver spring.datasource.mysql-server.driver-class-name=com.kingbase8.Driver
spring.datasource.mysql-server.jdbc-url = jdbc:kingbase8://10.20.1.176:54321/equipment?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&currentSchema=root spring.datasource.mysql-server.jdbc-url = jdbc:kingbase8://10.20.1.176:54321/equipment?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&currentSchema=root
...@@ -14,7 +15,7 @@ spring.datasource.mysql-server.hikari.connection-timeout= 60000 ...@@ -14,7 +15,7 @@ spring.datasource.mysql-server.hikari.connection-timeout= 60000
spring.datasource.mysql-server.hikari.connection-test-query= SELECT 1 spring.datasource.mysql-server.hikari.connection-test-query= SELECT 1
#TDengine ??? #TDengine ???
spring.datasource.tdengine-server.driver-class-name=com.taosdata.jdbc.rs.RestfulDriver spring.datasource.tdengine-server.driver-class-name=com.taosdata.jdbc.rs.RestfulDriver
spring.datasource.tdengine-server.jdbc-url = jdbc:TAOS-RS://139.9.170.47:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true spring.datasource.tdengine-server.jdbc-url = jdbc:TAOS-RS://10.20.0.169:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.datasource.tdengine-server.username=root spring.datasource.tdengine-server.username=root
spring.datasource.tdengine-server.password=taosdata spring.datasource.tdengine-server.password=taosdata
spring.datasource.tdengine-server.type=com.zaxxer.hikari.HikariDataSource spring.datasource.tdengine-server.type=com.zaxxer.hikari.HikariDataSource
...@@ -27,8 +28,11 @@ spring.datasource.tdengine-server.hikari.max-lifetime= 1800000 ...@@ -27,8 +28,11 @@ spring.datasource.tdengine-server.hikari.max-lifetime= 1800000
spring.datasource.tdengine-server.hikari.connection-timeout= 60000 spring.datasource.tdengine-server.hikari.connection-timeout= 60000
spring.datasource.tdengine-server.hikari.connection-test-query= show tables spring.datasource.tdengine-server.hikari.connection-test-query= show tables
spring.redis.database=0 spring.redis.database=0
spring.redis.host=139.9.173.44 spring.redis.host=10.20.0.169
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=yeejoin@2020 spring.redis.password=yeejoin@2020
spring.redis.timeout=3000 spring.redis.timeout=3000
...@@ -46,33 +50,35 @@ eureka.instance.lease-renewal-interval-in-seconds=5 ...@@ -46,33 +50,35 @@ eureka.instance.lease-renewal-interval-in-seconds=5
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path=/actuator/info eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.hostname= 139.9.173.44 eureka.instance.hostname= 172.17.3.6
eureka.instance.prefer-ip-address = true eureka.instance.prefer-ip-address = true
eureka.client.serviceUrl.defaultZone=http://${spring.security.user.name}:${spring.security.user.password}@139.9.173.44:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://${spring.security.user.name}:${spring.security.user.password}@10.20.1.160:10001/eureka/
spring.security.user.name=admin spring.security.user.name=admin
spring.security.user.password=a1234560 spring.security.user.password=a1234560
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.biz-client-id=consumer-${random.int[1,65536]} emqx.biz-client-id=consumer-${random.int[1024,65536]}
emqx.broker=tcp://139.9.173.44:1883 emqx.broker=tcp://10.20.1.210:2883
emqx.client-user-name=admin emqx.client-user-name=admin
emqx.client-password=public emqx.client-password=public
emqx.max-inflight=1000 emqx.max-inflight=1000
emqx.keep-alive-interval=10 emqx.keep-alive-interval=100
emqx.biz-topic[0]= iot/data/perspective emqx.biz-topic[0]= iot/data/perspective
#kafka #kafka
spring.kafka.bootstrap-servers=139.9.173.44:9092 spring.kafka.bootstrap-servers=10.20.0.169:9092
spring.kafka.producer.retries=1 spring.kafka.producer.retries=1
spring.kafka.producer.bootstrap-servers=139.9.173.44:9092 spring.kafka.producer.bootstrap-servers=10.20.0.169:9092
spring.kafka.producer.batch-size=16384 spring.kafka.producer.batch-size=16384
spring.kafka.producer.buffer-memory=33554432 spring.kafka.producer.buffer-memory=33554432
spring.kafka.producer.acks=1 spring.kafka.producer.acks=1
spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.consumer.group-id=messageConsumerGroup spring.kafka.consumer.group-id=messageConsumerGroup
spring.kafka.consumer.bootstrap-servers=139.9.173.44:9092 spring.kafka.consumer.bootstrap-servers=10.20.0.169:9092
spring.kafka.consumer.enable-auto-commit=true spring.kafka.consumer.enable-auto-commit=true
spring.kafka.consumer.auto-offset-reset=earliest spring.kafka.consumer.auto-offset-reset=earliest
spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
...@@ -85,12 +91,12 @@ kafka.alarm.topic=EQUIPMENT_ALARM ...@@ -85,12 +91,12 @@ kafka.alarm.topic=EQUIPMENT_ALARM
kafka.topic=PERSPECTIVE kafka.topic=PERSPECTIVE
emq.topic=iot/data/perspective emq.topic=iot/data/perspective
elasticsearch.address= 139.9.173.44:9200 elasticsearch.address=10.20.0.169:9200
elasticsearch.username= elastic elasticsearch.username=elastic
elasticsearch.password= Yeejoin@2020 elasticsearch.password=123456
elasticsearch.scheme= http elasticsearch.scheme=http
elasticsearch.connectTimeout= 50000 elasticsearch.connectTimeout=50000
elasticsearch.socketTimeout= 50000 elasticsearch.socketTimeout=50000
elasticsearch.connectionRequestTimeout= 50000 elasticsearch.connectionRequestTimeout=50000
elasticsearch.maxConnectNum= 1000 elasticsearch.maxConnectNum=1000
elasticsearch.maxConnectPerRoute= 1000 elasticsearch.maxConnectPerRoute=1000
\ No newline at end of file
spring.application.name=AMOS-DATA-EQUIP spring.application.name=AMOS-DATA-EQUIP-CZ
server.servlet.context-path=/data-equip server.servlet.context-path=/data-equip
server.port=8100 server.port=8100
spring.profiles.active=dev spring.profiles.active=kingbase8
server.compression.enabled=true server.compression.enabled=true
spring.jackson.dateFormat=yyyy-MM-dd HH:mm:ss spring.jackson.dateFormat=yyyy-MM-dd HH:mm:ss
......
...@@ -84,7 +84,7 @@ public class AmosJxiopAnalyseApplication { ...@@ -84,7 +84,7 @@ public class AmosJxiopAnalyseApplication {
public void initMqtt() throws Exception { public void initMqtt() throws Exception {
if (openHealth) { if (openHealth) {
//订阅固化周期性数据成功的消息 //订阅固化周期性数据成功的消息
emqKeeper.subscript("sync_esdata_to_tdengine_notice", 1, syncESDataToTdengineMqttListener); emqKeeper.subscript("sync_esdata_to_tdengine_notice1", 1, syncESDataToTdengineMqttListener);
//订阅业务固化同步数据成功消息 //订阅业务固化同步数据成功消息
emqKeeper.subscript("sync_iotdata_to_tdengine_notice", 1, syncDasSuccessMqttListener); emqKeeper.subscript("sync_iotdata_to_tdengine_notice", 1, syncDasSuccessMqttListener);
} }
......
...@@ -2501,7 +2501,8 @@ public class CommonServiceImpl { ...@@ -2501,7 +2501,8 @@ public class CommonServiceImpl {
Map<String, Float> indicatorDataListAllMap = indicatorDataListAll.stream() Map<String, Float> indicatorDataListAllMap = indicatorDataListAll.stream()
.collect(Collectors.toMap( .collect(Collectors.toMap(
indicatorData -> indicatorData.getAddress() + "_" + indicatorData.getGatewayId(), indicatorData -> indicatorData.getAddress() + "_" + indicatorData.getGatewayId(),
IndicatorData::getValueF)); IndicatorData::getValueF,
(value1, value2) -> value1));
HashMap<String, Double> idxBizPvPointProcessVariableClassificationDtoIdValueMap = new HashMap<>(); HashMap<String, Double> idxBizPvPointProcessVariableClassificationDtoIdValueMap = new HashMap<>();
for (IdxBizPvPointProcessVariableClassificationDto datum : data) { for (IdxBizPvPointProcessVariableClassificationDto datum : data) {
// for (ESEquipments equipment : equipments) { // for (ESEquipments equipment : equipments) {
......
...@@ -26,15 +26,14 @@ spring.db6.datasource.password=Yeejoin@2020 ...@@ -26,15 +26,14 @@ spring.db6.datasource.password=Yeejoin@2020
spring.db6.datasource.driver-class-name=com.kingbase8.Driver spring.db6.datasource.driver-class-name=com.kingbase8.Driver
## eureka properties: ## eureka properties:
eureka.instance.hostname=47.92.234.253 eureka.instance.hostname=10.20.1.160
eureka.client.serviceUrl.defaultZone=http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties: ## redis properties:
spring.redis.database=1 spring.redis.database=1
spring.redis.host=47.92.234.253 spring.redis.host=10.20.0.169
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=yeejoin@2020 spring.redis.password=yeejoin@2020
openHealth=false
spring.cache.type=GENERIC spring.cache.type=GENERIC
j2cache.open-spring-cache=true j2cache.open-spring-cache=true
j2cache.cache-clean-mode=passive j2cache.cache-clean-mode=passive
...@@ -66,10 +65,10 @@ lettuce.timeout=10000 ...@@ -66,10 +65,10 @@ lettuce.timeout=10000
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://47.92.234.253:2883 emqx.broker=tcp://10.20.1.210:2883
emqx.user-name=admin emqx.user-name=admin
emqx.password=public emqx.password=public
mqtt.scene.host=mqtt://47.92.234.253:8083/mqtt mqtt.scene.host=mqtt://10.20.1.210:8083/mqtt
mqtt.client.product.id=mqtt mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000 spring.mqtt.completionTimeout=3000
...@@ -79,13 +78,13 @@ emqx.client-password=public ...@@ -79,13 +78,13 @@ emqx.client-password=public
tdengine-server: tdengine-server:
driver-class-name: com.taosdata.jdbc.rs.RestfulDriver driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
jdbc-url: jdbc:TAOS-RS://10.20.0.203:6041/iot_data_1?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true jdbc-url: jdbc:TAOS-RS://10.20.0.169:6041/iot_data_1?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
username: root username: root
password: taosdata password: taosdata
#spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource #spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url=jdbc:TAOS-RS://10.20.0.203:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true spring.db3.datasource.url=jdbc:TAOS-RS://10.20.0.169:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.username=root spring.db3.datasource.username=root
spring.db3.datasource.password=taosdata spring.db3.datasource.password=taosdata
spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
...@@ -93,7 +92,7 @@ spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver ...@@ -93,7 +92,7 @@ spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
# ����ר��td���ݿ� analyse_data # ����ר��td���ݿ� analyse_data
#spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource #spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url=jdbc:TAOS-RS://10.20.0.203:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true spring.db4.datasource.url=jdbc:TAOS-RS://10.20.0.169:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.username=root spring.db4.datasource.username=root
spring.db4.datasource.password=taosdata spring.db4.datasource.password=taosdata
spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
...@@ -150,7 +149,7 @@ amos.secret.key=qaz ...@@ -150,7 +149,7 @@ amos.secret.key=qaz
#eureka.instance.ip-address=172.16.3.122 #eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url=tcp://47.92.234.253:61616 spring.activemq.broker-url=tcp://10.20.0.169:61616
spring.activemq.user=admin spring.activemq.user=admin
spring.activemq.password=admin spring.activemq.password=admin
spring.jms.pub-sub-domain=false spring.jms.pub-sub-domain=false
...@@ -166,16 +165,16 @@ pictureUrl=upload/jxiop/syz/ ...@@ -166,16 +165,16 @@ pictureUrl=upload/jxiop/syz/
#kafka #kafka
spring.kafka.bootstrap-servers=10.20.0.223:9092,10.20.0.133:9200 spring.kafka.bootstrap-servers=10.20.0.169:9092
spring.kafka.producer.retries=1 spring.kafka.producer.retries=1
spring.kafka.producer.bootstrap-servers=10.20.0.223:9092,10.20.0.133:9200 spring.kafka.producer.bootstrap-servers=10.20.0.169:9092
spring.kafka.producer.batch-size=16384 spring.kafka.producer.batch-size=16384
spring.kafka.producer.buffer-memory=33554432 spring.kafka.producer.buffer-memory=33554432
spring.kafka.producer.acks=1 spring.kafka.producer.acks=1
spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.consumer.group-id=consumerGroup spring.kafka.consumer.group-id=consumerGroup
spring.kafka.consumer.bootstrap-servers=10.20.0.223:9092,10.20.0.133:9200 spring.kafka.consumer.bootstrap-servers=10.20.0.169:9092
spring.kafka.consumer.enable-auto-commit=false spring.kafka.consumer.enable-auto-commit=false
spring.kafka.consumer.auto-offset-reset=earliest spring.kafka.consumer.auto-offset-reset=earliest
spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
......
...@@ -75,7 +75,7 @@ station.section=10 ...@@ -75,7 +75,7 @@ station.section=10
gl.sum.column=日发电量,月发电量,年发电量 gl.sum.column=日发电量,月发电量,年发电量
gl.avg.column=有功功率,日利用小时,瞬时风速 gl.avg.column=有功功率,日利用小时,瞬时风速
spring.elasticsearch.rest.uris=http://139.9.173.44:9200 spring.elasticsearch.rest.uris=http://10.20.0.169:9200
spring.elasticsearch.rest.connection-timeout=30000 spring.elasticsearch.rest.connection-timeout=30000
spring.elasticsearch.rest.username=elastic spring.elasticsearch.rest.username=elastic
spring.elasticsearch.rest.password=Yeejoin@2020 spring.elasticsearch.rest.password=Yeejoin@2020
...@@ -90,4 +90,4 @@ healthValue_HourCount=6 ...@@ -90,4 +90,4 @@ healthValue_HourCount=6
healthValue_MinCount=5 healthValue_MinCount=5
##是否打开健康计算计算 true 打开 false 关闭 ##是否打开健康计算计算 true 打开 false 关闭
openHealth = false openHealth = true
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointProcessVariableClassificationMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointProcessVariableClassificationMapper">
<select id="getInfluxDBData" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointProcessVariableClassificationDto"> <select id="getInfluxDBData" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointProcessVariableClassificationDto">
SELECT SELECT
b.*, b.SEQUENCE_NBR,
b.INDEX_ADDRESS,
b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID AS pointOneId, ibfpvcv.PROCESS_POINT1_ID AS pointOneId,
ibfpvcv.PROCESS_POINT2_ID AS pointTwoId, ibfpvcv.PROCESS_POINT2_ID AS pointTwoId,
ibfpvcv.PROCESS_POINT3_ID AS pointThreeId, ibfpvcv.PROCESS_POINT3_ID AS pointThreeId,
...@@ -21,9 +23,17 @@ ...@@ -21,9 +23,17 @@
WHERE WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
GROUP BY GROUP BY
b.SEQUENCE_NBR UNION ALL b.SEQUENCE_NBR,
SELECT b.INDEX_ADDRESS,
b.*, b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID,
ibfpvcv.PROCESS_POINT2_ID,
ibfpvcv.PROCESS_POINT3_ID,
ibfpvcv.ANALYSIS_POINT_ID UNION ALL
SELECT
b.SEQUENCE_NBR,
b.INDEX_ADDRESS,
b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID AS pointOneId, ibfpvcv.PROCESS_POINT1_ID AS pointOneId,
ibfpvcv.PROCESS_POINT2_ID AS pointTwoId, ibfpvcv.PROCESS_POINT2_ID AS pointTwoId,
ibfpvcv.PROCESS_POINT3_ID AS pointThreeId, ibfpvcv.PROCESS_POINT3_ID AS pointThreeId,
...@@ -41,9 +51,17 @@ ...@@ -41,9 +51,17 @@
WHERE WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
GROUP BY GROUP BY
b.SEQUENCE_NBR UNION ALL b.SEQUENCE_NBR,
SELECT b.INDEX_ADDRESS,
b.*, b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID,
ibfpvcv.PROCESS_POINT2_ID,
ibfpvcv.PROCESS_POINT3_ID,
ibfpvcv.ANALYSIS_POINT_ID UNION ALL
SELECT
b.SEQUENCE_NBR,
b.INDEX_ADDRESS,
b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID AS pointOneId, ibfpvcv.PROCESS_POINT1_ID AS pointOneId,
ibfpvcv.PROCESS_POINT2_ID AS pointTwoId, ibfpvcv.PROCESS_POINT2_ID AS pointTwoId,
ibfpvcv.PROCESS_POINT3_ID AS pointThreeId, ibfpvcv.PROCESS_POINT3_ID AS pointThreeId,
...@@ -61,9 +79,17 @@ ...@@ -61,9 +79,17 @@
WHERE WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
GROUP BY GROUP BY
b.SEQUENCE_NBR UNION ALL b.SEQUENCE_NBR,
SELECT b.INDEX_ADDRESS,
b.*, b.GATEWAY_ID ,
ibfpvcv.PROCESS_POINT1_ID,
ibfpvcv.PROCESS_POINT2_ID,
ibfpvcv.PROCESS_POINT3_ID,
ibfpvcv.ANALYSIS_POINT_ID UNION ALL
SELECT
b.SEQUENCE_NBR,
b.INDEX_ADDRESS,
b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID AS pointOneId, ibfpvcv.PROCESS_POINT1_ID AS pointOneId,
ibfpvcv.PROCESS_POINT2_ID AS pointTwoId, ibfpvcv.PROCESS_POINT2_ID AS pointTwoId,
ibfpvcv.PROCESS_POINT3_ID AS pointThreeId, ibfpvcv.PROCESS_POINT3_ID AS pointThreeId,
...@@ -81,7 +107,13 @@ ...@@ -81,7 +107,13 @@
WHERE WHERE
b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
GROUP BY GROUP BY
b.SEQUENCE_NBR b.SEQUENCE_NBR,
b.INDEX_ADDRESS,
b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID,
ibfpvcv.PROCESS_POINT2_ID,
ibfpvcv.PROCESS_POINT3_ID,
ibfpvcv.ANALYSIS_POINT_ID
</select> </select>
<select id="getInfluxDBDataByGatewayId" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointProcessVariableClassificationDto"> <select id="getInfluxDBDataByGatewayId" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointProcessVariableClassificationDto">
SELECT SELECT
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
<select id="getInfluxDBData" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointProcessVariableClassificationDto"> <select id="getInfluxDBData" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointProcessVariableClassificationDto">
SELECT SELECT
b.*, b.SEQUENCE_NBR,
b.INDEX_ADDRESS,
b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID AS pointOneId, ibfpvcv.PROCESS_POINT1_ID AS pointOneId,
ibfpvcv.PROCESS_POINT2_ID AS pointTwoId, ibfpvcv.PROCESS_POINT2_ID AS pointTwoId,
ibfpvcv.PROCESS_POINT3_ID AS pointThreeId, ibfpvcv.PROCESS_POINT3_ID AS pointThreeId,
...@@ -19,15 +21,23 @@ ...@@ -19,15 +21,23 @@
FROM FROM
idx_biz_pv_point_process_variable_classification uxfv idx_biz_pv_point_process_variable_classification uxfv
WHERE WHERE
uxfv.SEQUENCE_NBR IN ( SELECT PROCESS_POINT1_ID FROM `idx_biz_pv_point_var_central_value` WHERE ANALYSIS_POINT_ID IS NOT NULL GROUP BY ANALYSIS_POINT_ID, PROCESS_POINT1_ID, PROCESS_POINT3_ID, PROCESS_POINT2_ID ) uxfv.SEQUENCE_NBR IN ( SELECT PROCESS_POINT1_ID FROM idx_biz_pv_point_var_central_value WHERE ANALYSIS_POINT_ID IS NOT NULL GROUP BY ANALYSIS_POINT_ID, PROCESS_POINT1_ID, PROCESS_POINT3_ID, PROCESS_POINT2_ID )
) AS b, ) AS b,
idx_biz_pv_point_var_central_value ibfpvcv idx_biz_pv_point_var_central_value ibfpvcv
WHERE WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
GROUP BY GROUP BY
b.SEQUENCE_NBR UNION ALL b.SEQUENCE_NBR,
SELECT b.INDEX_ADDRESS,
b.*, b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID,
ibfpvcv.PROCESS_POINT2_ID,
ibfpvcv.PROCESS_POINT3_ID,
ibfpvcv.ANALYSIS_POINT_ID UNION ALL
SELECT
b.SEQUENCE_NBR,
b.INDEX_ADDRESS,
b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID AS pointOneId, ibfpvcv.PROCESS_POINT1_ID AS pointOneId,
ibfpvcv.PROCESS_POINT2_ID AS pointTwoId, ibfpvcv.PROCESS_POINT2_ID AS pointTwoId,
ibfpvcv.PROCESS_POINT3_ID AS pointThreeId, ibfpvcv.PROCESS_POINT3_ID AS pointThreeId,
...@@ -39,15 +49,23 @@ ...@@ -39,15 +49,23 @@
FROM FROM
idx_biz_pv_point_process_variable_classification uxfv idx_biz_pv_point_process_variable_classification uxfv
WHERE WHERE
uxfv.SEQUENCE_NBR IN ( SELECT PROCESS_POINT2_ID FROM `idx_biz_pv_point_var_central_value` WHERE ANALYSIS_POINT_ID IS NOT NULL GROUP BY ANALYSIS_POINT_ID, PROCESS_POINT1_ID, PROCESS_POINT3_ID, PROCESS_POINT2_ID ) uxfv.SEQUENCE_NBR IN ( SELECT PROCESS_POINT2_ID FROM idx_biz_pv_point_var_central_value WHERE ANALYSIS_POINT_ID IS NOT NULL GROUP BY ANALYSIS_POINT_ID, PROCESS_POINT1_ID, PROCESS_POINT3_ID, PROCESS_POINT2_ID )
) AS b, ) AS b,
idx_biz_pv_point_var_central_value ibfpvcv idx_biz_pv_point_var_central_value ibfpvcv
WHERE WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
GROUP BY GROUP BY
b.SEQUENCE_NBR UNION ALL b.SEQUENCE_NBR,
SELECT b.INDEX_ADDRESS,
b.*, b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID,
ibfpvcv.PROCESS_POINT2_ID,
ibfpvcv.PROCESS_POINT3_ID,
ibfpvcv.ANALYSIS_POINT_ID UNION ALL
SELECT
b.SEQUENCE_NBR,
b.INDEX_ADDRESS,
b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID AS pointOneId, ibfpvcv.PROCESS_POINT1_ID AS pointOneId,
ibfpvcv.PROCESS_POINT2_ID AS pointTwoId, ibfpvcv.PROCESS_POINT2_ID AS pointTwoId,
ibfpvcv.PROCESS_POINT3_ID AS pointThreeId, ibfpvcv.PROCESS_POINT3_ID AS pointThreeId,
...@@ -59,16 +77,23 @@ ...@@ -59,16 +77,23 @@
FROM FROM
idx_biz_pv_point_process_variable_classification uxfv idx_biz_pv_point_process_variable_classification uxfv
WHERE WHERE
uxfv.SEQUENCE_NBR IN ( SELECT PROCESS_POINT3_ID FROM `idx_biz_pv_point_var_central_value` WHERE ANALYSIS_POINT_ID IS NOT NULL GROUP BY ANALYSIS_POINT_ID, PROCESS_POINT1_ID, PROCESS_POINT3_ID, PROCESS_POINT2_ID ) uxfv.SEQUENCE_NBR IN ( SELECT PROCESS_POINT3_ID FROM idx_biz_pv_point_var_central_value WHERE ANALYSIS_POINT_ID IS NOT NULL GROUP BY ANALYSIS_POINT_ID, PROCESS_POINT1_ID, PROCESS_POINT3_ID, PROCESS_POINT2_ID )
) AS b, ) AS b,
idx_biz_pv_point_var_central_value ibfpvcv idx_biz_pv_point_var_central_value ibfpvcv
WHERE WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
GROUP BY GROUP BY
b.SEQUENCE_NBR UNION ALL b.SEQUENCE_NBR,
SELECT b.INDEX_ADDRESS,
b.*, b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID,
ibfpvcv.PROCESS_POINT2_ID,
ibfpvcv.PROCESS_POINT3_ID,
ibfpvcv.ANALYSIS_POINT_ID UNION ALL
SELECT
b.SEQUENCE_NBR,
b.INDEX_ADDRESS,
b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID AS pointOneId, ibfpvcv.PROCESS_POINT1_ID AS pointOneId,
ibfpvcv.PROCESS_POINT2_ID AS pointTwoId, ibfpvcv.PROCESS_POINT2_ID AS pointTwoId,
ibfpvcv.PROCESS_POINT3_ID AS pointThreeId, ibfpvcv.PROCESS_POINT3_ID AS pointThreeId,
...@@ -80,13 +105,19 @@ ...@@ -80,13 +105,19 @@
FROM FROM
idx_biz_pv_point_process_variable_classification uxfv idx_biz_pv_point_process_variable_classification uxfv
WHERE WHERE
uxfv.SEQUENCE_NBR IN ( SELECT ANALYSIS_POINT_ID FROM `idx_biz_pv_point_var_central_value` WHERE ANALYSIS_POINT_ID IS NOT NULL GROUP BY ANALYSIS_POINT_ID, PROCESS_POINT1_ID, PROCESS_POINT3_ID, PROCESS_POINT2_ID ) uxfv.SEQUENCE_NBR IN ( SELECT ANALYSIS_POINT_ID FROM idx_biz_pv_point_var_central_value WHERE ANALYSIS_POINT_ID IS NOT NULL GROUP BY ANALYSIS_POINT_ID, PROCESS_POINT1_ID, PROCESS_POINT3_ID, PROCESS_POINT2_ID )
) AS b, ) AS b,
idx_biz_pv_point_var_central_value ibfpvcv idx_biz_pv_point_var_central_value ibfpvcv
WHERE WHERE
b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
GROUP BY GROUP BY
b.SEQUENCE_NBR b.SEQUENCE_NBR,
b.INDEX_ADDRESS,
b.GATEWAY_ID,
ibfpvcv.PROCESS_POINT1_ID,
ibfpvcv.PROCESS_POINT2_ID,
ibfpvcv.PROCESS_POINT3_ID,
ibfpvcv.ANALYSIS_POINT_ID
</select> </select>
<select id="getInfluxDBDataByGatewayId" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointProcessVariableClassificationDto"> <select id="getInfluxDBDataByGatewayId" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvPointProcessVariableClassificationDto">
SELECT SELECT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment