Browse Source

1、保利山庄部署资料配置以及监视界面优化

dev_blsz
3067418132@qq.com 2 weeks ago
parent
commit
53560f0d89
  1. 19
      mh-admin/src/main/resources/application-prod.yml
  2. 2
      mh-admin/src/main/resources/application.yml
  3. 2
      mh-admin/src/main/resources/logback.xml
  4. 41
      mh-system/src/main/java/com/mh/system/service/device/impl/CoolingSystemMonitorServiceImpl.java

19
mh-admin/src/main/resources/application-prod.yml

@ -1,13 +1,13 @@
# 项目相关配置
mh:
# 名称
name: bl_eems
name: blsz_eemcs
# 版本
version: 1.0.0
# 版权年份
copyrightYear: 2026
# 文件路径 示例( Windows配置D:/mh/uploadPath,Linux配置 /home/mh/uploadPath)
profile: D:/mh_data/uploadPath
profile: E:/mh_data/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证
@ -63,7 +63,7 @@ spring:
# 端口,默认为6379
port: 6379
# 数据库索引
database: 1
database: 13
# 密码
password:
# 连接超时时间
@ -82,9 +82,9 @@ spring:
rabbitmq:
host: 127.0.0.1
port: 5672
username: eemcs
username: eemcs_blsz
password: mh@803
virtual-host: eems_bl
virtual-host: eemcs_blsz
listener:
direct:
prefetch: 2
@ -98,10 +98,9 @@ spring:
# 主库数据源
master:
#添加allowMultiQueries=true 在批量更新时才不会出错
url: jdbc:postgresql://127.0.0.1:5232/bl_eems
# url: jdbc:postgresql://127.0.0.1:5505/eemcs
username: postgres
password: mhtech@803
url: jdbc:postgresql://10.0.12.10:5505/eemcs_blsz
username: eemcs_blsz
password: mhtech@ratuo123
# 从库数据源
slave:
# 从数据源开关/默认关闭
@ -195,7 +194,7 @@ mqttSpring:
protocol: MQTT
host: mqtt.mhito.net
port: 1883
username: eemcs_gh_ers
username: eemcs_blsz_ers
password: mhtech@ghers
client-id: eemcs_gh_ers_mqtt_pro
# If the protocol is ws/wss, this value is required.

2
mh-admin/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring:
profiles:
active: dev
active: prod
# 用户配置
user:

2
mh-admin/src/main/resources/logback.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 日志存放路径 -->
<property name="log.path" value="/home/mh/gh_ers/logs" />
<property name="log.path" value="/home/mh/blsz/logs" />
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />

41
mh-system/src/main/java/com/mh/system/service/device/impl/CoolingSystemMonitorServiceImpl.java

@ -239,9 +239,11 @@ public class CoolingSystemMonitorServiceImpl implements ICoolingSystemMonitorSer
.filter(value -> "17".equals(value.getParamType()) && "15".equals(value.getTerminalDeviceType()) && value.getCurTime() != null)
.filter(value -> DateUtils.isSameDay(new Date(), value.getCurTime()))
.filter(value -> value.getGrade() == 140)
.map(CollectionParamsManage::getCurValue)
.filter(value -> value.getCurValue() != null)
.map(value -> value.getCurValue().abs())
.reduce(BigDecimal.ZERO, BigDecimal::add);
sysPerformanceDTO.setRealCold(totalRealCold);
}
@ -329,6 +331,43 @@ public class CoolingSystemMonitorServiceImpl implements ICoolingSystemMonitorSer
// 室外湿球温度
BigDecimal wetBulbTemp = weatherUtil.returnComputePsi(temperature, (double) humidity / 100, Double.parseDouble(pressure) * 1000);
result.put("wetBulbTemp", wetBulbTemp.setScale(1, RoundingMode.HALF_UP).toString());
} else {
// 查询跟当前时间yyyy-MM-dd HH相同的数据
WeatherData weatherData = weatherDataMapper.selectWeatherDataByDate(DateUtils.getTime());
if (weatherData != null) {
WeatherUtil weatherUtil = new WeatherUtil();
// 室外温度
int temperature = weatherData.getTemperature();
result.putIfAbsent("temperature", temperature + "");
// 室外湿度
int humidity = weatherData.getHumidity();
result.putIfAbsent("humidity", humidity + "");
// 室外压力,采用标准大气压 101325 Pa
String pressure = "101.325";
// result.putIfAbsent("pressure", new BigDecimal("101.325") + "");
// 室外含湿
BigDecimal humidityRatio = weatherUtil.returnMoistureContent(String.valueOf(temperature),
String.valueOf(new BigDecimal(humidity).divide(new BigDecimal("100")).setScale(1, RoundingMode.HALF_UP)),
pressure);
result.put("humidityRatio", humidityRatio.setScale(1, RoundingMode.HALF_UP).toString());
// 室外焓值
BigDecimal enthalpy = weatherUtil.returnEnthalpy(String.valueOf(temperature),
String.valueOf(new BigDecimal(humidity).divide(new BigDecimal("100")).setScale(1, RoundingMode.HALF_UP)),
pressure);
result.put("enthalpy", enthalpy.setScale(1, RoundingMode.HALF_UP).toString());
// 室外露点温度
BigDecimal dewPointTemp = weatherUtil.calculateDewPoint(temperature, humidity);
result.put("dewPointTemp", dewPointTemp.setScale(1, RoundingMode.HALF_UP).toString());
// 室外湿球温度
BigDecimal wetBulbTemp = weatherUtil.returnComputePsi(temperature, (double) humidity / 100, Double.parseDouble(pressure) * 1000);
result.put("wetBulbTemp", wetBulbTemp.setScale(1, RoundingMode.HALF_UP).toString());
}
}
return result;
}

Loading…
Cancel
Save