Commit 5a91d84b authored by 高建强's avatar 高建强

item:消防水池液位计算修改

parent aec51bae
...@@ -1404,20 +1404,21 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1404,20 +1404,21 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
area = Double.valueOf(map.get("area").toString()); area = Double.valueOf(map.get("area").toString());
} }
String maxlevel = map.get("max_level") != null ? map.get("max_level").toString() : "0.0"; String maxlevel = map.get("max_level") != null ? map.get("max_level").toString() : "0.0";
String level = map.get("value") != null && StringUtil.isNumeric(map.get("value").toString()) ? String.format("%.2f", (Double.valueOf(map.get("value").toString()))) : maxlevel; // String level = map.get("value") != null && StringUtil.isNumeric(map.get("value").toString()) ? String.format("%.2f", (Double.valueOf(map.get("value").toString()))) : maxlevel;
String volume = map.get("volume") != null && StringUtil.isNumeric(map.get("volume").toString()) ? String.format("%.2f", (Double.valueOf(map.get("volume").toString()))) : String.format("%.2f", Double.valueOf(maxlevel) * area);
String volume = String.format("%.2f", Double.valueOf(level) * area); // String volume = String.format("%.2f", Double.valueOf(level) * area);
if (hashOperations.size("Analogue") > 0) { if (hashOperations.size("Analogue") > 0) {
if (ObjectUtils.isEmpty(map.get("CODE")) || !hashOperations.hasKey("Analogue", map.get("CODE"))) { if (ObjectUtils.isEmpty(map.get("code")) || !hashOperations.hasKey("Analogue", map.get("code"))) {
map.put("level", level); map.put("level", maxlevel);
map.put("volume", volume); map.put("volume", volume);
continue; continue;
} }
EquipCommunicationData data = (EquipCommunicationData) hashOperations.get("Analogue", map.get("CODE")); EquipCommunicationData data = (EquipCommunicationData) hashOperations.get("Analogue", map.get("code"));
map.put("level", StringUtil.isNumeric(data.getState()) ? data.getState() : level); String level = StringUtil.isNumeric(data.getState()) ? data.getState() : maxlevel;
map.put("volume", String.format("%.2f", (Double.valueOf(map.get("level").toString()) * area)));
} else {
map.put("level", level); map.put("level", level);
map.put("volume", map.get("volume") != null && StringUtil.isNumeric(map.get("volume").toString()) ? volume : String.format("%.2f", (Double.valueOf(level) * area)));
} else {
map.put("level", maxlevel);
map.put("volume", volume); map.put("volume", volume);
} }
} }
......
#DB properties: #DB properties:
spring.datasource.url=jdbc:mysql://172.16.11.20:3306/autosys_business_v3.0.0.2?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url = jdbc:mysql://172.16.10.85:3306/autosys_business_v3.0.0.2?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=root_123 spring.datasource.password=Amos2019Mysql8
spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver
spring.datasource.hikari.maxLifetime = 1765000 spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10 spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1 spring.datasource.validationQuery = SELECT 1
#系统服务账号,用户后端服务调用 #系统服务账号,用户后端服务调用
security.password=a1234560 security.password=a1234560
security.loginId=fas_autosys security.loginId=fas_autosys
#应用product appkey #应用product appkey
security.productWeb=STUDIO_APP_WEB security.productWeb=STUDIO_APP_WEB
security.appKey =studio_normalapp_2681691 security.appKey =studio_normalapp_2681691
eureka.client.serviceUrl.defaultZone=http://172.16.11.20:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://172.16.11.20:10001/eureka/
eureka.client.register-with-eureka = true eureka.client.register-with-eureka = true
eureka.client.fetch-registry = true eureka.client.fetch-registry = true
eureka.client.healthcheck.enabled = true eureka.client.healthcheck.enabled = true
eureka.client.fetchRegistry = true eureka.client.fetchRegistry = true
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
#redis #redis
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.11.20 spring.redis.host=172.16.11.20
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=1234560 spring.redis.password=1234560
spring.redis.jedis.pool.max-active=200 spring.redis.jedis.pool.max-active=200
spring.redis.jedis.pool.max-wait=-1 spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10 spring.redis.jedis.pool.max-idle=10
spring.redis.jedis.pool.min-idle=0 spring.redis.jedis.pool.min-idle=0
spring.redis.timeout=1000 spring.redis.timeout=1000
#picture upload #picture upload
windows.img.path = C:\\ windows.img.path = C:\\
linux.img.path = / linux.img.path = /
file.uploadUrl=C:\\upload\\files\\ file.uploadUrl=C:\\upload\\files\\
#picture read #picture read
file.readUrl=http://172.16.11.33:8085/file/getFile?in= file.readUrl=http://172.16.11.33:8085/file/getFile?in=
#jpush 推送开关 #jpush 推送开关
params.isPush=false params.isPush=false
## emqx ## emqx
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://172.16.11.33:1883 emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin emqx.user-name=admin
emqx.password=public emqx.password=public
#文件服务器地址 #文件服务器地址
file.downLoad.url=http://39.98.246.31:8888/ file.downLoad.url=http://39.98.246.31:8888/
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