|
|
|
@ -239,9 +239,11 @@ public class CoolingSystemMonitorServiceImpl implements ICoolingSystemMonitorSer |
|
|
|
.filter(value -> "17".equals(value.getParamType()) && "15".equals(value.getTerminalDeviceType()) && value.getCurTime() != null) |
|
|
|
.filter(value -> "17".equals(value.getParamType()) && "15".equals(value.getTerminalDeviceType()) && value.getCurTime() != null) |
|
|
|
.filter(value -> DateUtils.isSameDay(new Date(), value.getCurTime())) |
|
|
|
.filter(value -> DateUtils.isSameDay(new Date(), value.getCurTime())) |
|
|
|
.filter(value -> value.getGrade() == 140) |
|
|
|
.filter(value -> value.getGrade() == 140) |
|
|
|
.map(CollectionParamsManage::getCurValue) |
|
|
|
.filter(value -> value.getCurValue() != null) |
|
|
|
|
|
|
|
.map(value -> value.getCurValue().abs()) |
|
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sysPerformanceDTO.setRealCold(totalRealCold); |
|
|
|
sysPerformanceDTO.setRealCold(totalRealCold); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
@ -329,6 +331,43 @@ public class CoolingSystemMonitorServiceImpl implements ICoolingSystemMonitorSer |
|
|
|
// 室外湿球温度
|
|
|
|
// 室外湿球温度
|
|
|
|
BigDecimal wetBulbTemp = weatherUtil.returnComputePsi(temperature, (double) humidity / 100, Double.parseDouble(pressure) * 1000); |
|
|
|
BigDecimal wetBulbTemp = weatherUtil.returnComputePsi(temperature, (double) humidity / 100, Double.parseDouble(pressure) * 1000); |
|
|
|
result.put("wetBulbTemp", wetBulbTemp.setScale(1, RoundingMode.HALF_UP).toString()); |
|
|
|
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; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|