浏览代码

抄表BUG和设备安装模板BUG

lin 4 年之前
父节点
当前提交
ef1c361dbc

+ 1 - 1
smart-city-job/src/main/java/com/zcxk/job/service/impl/MeterReadRecordServiceImpl.java

@@ -93,7 +93,7 @@ public class MeterReadRecordServiceImpl implements MeterReadRecordService {
                 meterReadRecord.setDeviceTypeId(deviceDto.getDeviceType());
                 meterReadRecord.setReadTime(LocalDateTime.now());
                 meterReadRecord.setReadData("");
-                meterReadRecord.setReadStatus(2);
+                meterReadRecord.setReadStatus(1);
                 meterReadRecord.setLastValid("");
                 meterReadRecord.setLastCost(0.0);
                 meterReadRecord.setStatus(1);

+ 2 - 2
smart-city-job/src/main/java/com/zcxk/job/service/impl/WaterMeterReadRateServiceImpl.java

@@ -163,7 +163,7 @@ public class WaterMeterReadRateServiceImpl implements WaterMeterReadRateService
                         "siteId": "$siteId","channelId": "$channelId","customerId": "$customerId","buildingId": "$buildingId","deviceId": "$deviceId",
                     },
                             realReadTimes:{$sum:{
-                         $cond: { if: { $eq: ["$readStatus", "1"] }, then: 1, else: 0 }
+                         $cond: { if: { $eq: ["$readStatus", 2] }, then: 1, else: 0 }
                        }}
                 }},
                 {$group:{_id:{
@@ -197,7 +197,7 @@ public class WaterMeterReadRateServiceImpl implements WaterMeterReadRateService
         operations.add(Aggregation.match(Criteria.where("status").is(1)));
         operations.add(Aggregation.match(Criteria.where("readDate").gte(startDate).lte(endDate)));
         // 1,添加分组条件
-        ConditionalOperators.Cond readTimesCond = ConditionalOperators.when(new Criteria("readStatus").is(1)).then(1).otherwise(0);
+        ConditionalOperators.Cond readTimesCond = ConditionalOperators.when(new Criteria("readStatus").is(2)).then(1).otherwise(0);
         operations.add(Aggregation.group("siteId","channelId","customerId","buildingId","deviceId")
                 .sum(readTimesCond).as("realReadTimes"));
         // 2,添加分组条件

+ 2 - 2
smart-city-job/src/main/java/com/zcxk/job/service/impl/WaterMeterUnreadDeviceServiceImpl.java

@@ -164,7 +164,7 @@ public class WaterMeterUnreadDeviceServiceImpl implements WaterMeterUnreadDevice
                         "siteId": "$siteId","channelId": "$channelId","customerId": "$customerId","buildingId": "$buildingId","deviceId": "$deviceId",
                     },
                             realReadTimes:{$sum:{
-                         $cond: { if: { $eq: ["$readStatus", "1"] }, then: 1, else: 0 }
+                         $cond: { if: { $eq: ["$readStatus", 2] }, then: 1, else: 0 }
                        }}
                 }},
 				{$match:{realReadTimes:0}},
@@ -185,7 +185,7 @@ public class WaterMeterUnreadDeviceServiceImpl implements WaterMeterUnreadDevice
         operations.add(Aggregation.match(Criteria.where("status").is(1)));
         operations.add(Aggregation.match(Criteria.where("readDate").gte(startDate).lte(endDate)));
         // 1,添加分组条件
-        ConditionalOperators.Cond readTimesCond = ConditionalOperators.when(new Criteria("readStatus").is(1)).then(1).otherwise(0);
+        ConditionalOperators.Cond readTimesCond = ConditionalOperators.when(new Criteria("readStatus").is(2)).then(1).otherwise(0);
         operations.add(Aggregation.group("siteId","channelId","customerId","buildingId","deviceId")
                 .sum(readTimesCond).as("realReadTimes"));
 

+ 2 - 2
smart-city-job/src/main/resources/application.properties

@@ -55,8 +55,8 @@ xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler
 xxl.job.executor.logretentiondays=30
 
 #mongodb
-#spring.data.mongodb.uri=mongodb://114.135.61.188:17017/smartcity
-spring.data.mongodb.uri=mongodb://127.0.0.1:27017/test
+#spring.data.mongodb.uri=mongodb://127.0.0.1:27017/test
+spring.data.mongodb.uri=mongodb://114.135.61.188:17017/water-iot-database
 logging.level.org.springframework.data.mongodb.core=DEBUG
 
 

+ 1 - 1
smart-city-platform/src/main/resources/application-dev.properties

@@ -5,7 +5,7 @@ spring.thymeleaf.prefix=classpath:/templates/
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
 #spring.datasource.url=jdbc:mysql://10.0.0.161:3306/smart_city_sit_6_10?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
-spring.datasource.url=jdbc:mysql://114.135.61.188:33306/smart_city_sit_6_10?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
+spring.datasource.url=jdbc:mysql://114.135.61.188:33306/smart_city_sit_6_10?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&autoReconnect=true
 #spring.datasource.url=jdbc:mysql://47.112.217.10:3306/smart_city?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
 spring.datasource.username=root
 spring.datasource.password=100Zone@123

+ 1 - 1
smart-city-platform/src/main/resources/application-prd.properties

@@ -9,7 +9,7 @@ spring.thymeleaf.prefix=classpath:/templates/
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 #使用druid数据源
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
-spring.datasource.url=jdbc:mysql://172.18.110.178:3306/smart_city?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
+spring.datasource.url=jdbc:mysql://172.18.110.178:3306/smart_city?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&autoReconnect=true
 spring.datasource.username=root
 spring.datasource.password=100Zone@123
 spring.datasource.druid.initial-size=5

+ 1 - 1
smart-city-platform/src/main/resources/application-sit.properties

@@ -9,7 +9,7 @@ spring.thymeleaf.prefix=classpath:/templates/
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 #使用druid数据源
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
-spring.datasource.url=jdbc:mysql://10.0.0.161:3306/smart_city_sit_6_10?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
+spring.datasource.url=jdbc:mysql://10.0.0.161:3306/smart_city_sit_6_10?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&autoReconnect=true
 #spring.datasource.url=jdbc:mysql://114.135.61.188:23305/smart_city?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
 spring.datasource.username=root
 spring.datasource.password=100Zone@123

+ 1 - 1
smart-city-platform/src/main/resources/application-uat.properties

@@ -9,7 +9,7 @@ spring.thymeleaf.prefix=classpath:/templates/
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 #使用druid数据源
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
-spring.datasource.url=jdbc:mysql://10.0.0.157:3306/smart_city_uat?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
+spring.datasource.url=jdbc:mysql://10.0.0.157:3306/smart_city_uat?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&autoReconnect=true
 spring.datasource.username=root
 spring.datasource.password=zoniot
 spring.datasource.druid.initial-size=5

二进制
smart-city-platform/src/main/resources/excel/deviceTemplateV3.xlsx


二进制
smart-city-platform/src/main/resources/excel/installPlanTemplate.xlsm