|
|
|
|
@ -691,12 +691,19 @@ public class HeatPumpStrategy implements DeviceStrategy {
|
|
|
|
|
dataType = "runState"; |
|
|
|
|
if (dataStr.equalsIgnoreCase("2")) { //0
|
|
|
|
|
sValue = "运行"; //关机
|
|
|
|
|
//计算热泵运行时间,按分钟
|
|
|
|
|
nowDataService.proPumpMinutes(deviceInstallEntity.getBuildingId(), deviceInstallEntity.getDeviceAddr(), sValue); |
|
|
|
|
log.info("计算热泵运行时长,楼栋名称:" + deviceInstallEntity.getBuildingName() + ",热泵编号:" + deviceInstallEntity.getDeviceAddr() + ",状态:" + sValue); |
|
|
|
|
} else if (dataStr.equalsIgnoreCase("4")) { |
|
|
|
|
dataType = "isFault"; |
|
|
|
|
if (dataStr.equals("0")) { |
|
|
|
|
sValue = "无故障"; |
|
|
|
|
} else { |
|
|
|
|
sValue = "有故障"; |
|
|
|
|
} |
|
|
|
|
} else {//2
|
|
|
|
|
sValue = "不运行"; //制冷
|
|
|
|
|
} |
|
|
|
|
//计算热泵运行时间,按分钟
|
|
|
|
|
nowDataService.proPumpMinutes(deviceInstallEntity.getBuildingId(), deviceInstallEntity.getDeviceAddr(), sValue); |
|
|
|
|
log.info("计算热泵运行时长,楼栋名称:" + deviceInstallEntity.getBuildingName() + ",热泵编号:" + deviceInstallEntity.getDeviceAddr() + ",状态:" + sValue); |
|
|
|
|
} else if (paramTypeId == 7 || paramTypeId == 10) { |
|
|
|
|
//7设定温度,10水箱水温
|
|
|
|
|
if (paramTypeId == 7) { |
|
|
|
|
@ -728,13 +735,8 @@ public class HeatPumpStrategy implements DeviceStrategy {
|
|
|
|
|
} else { |
|
|
|
|
pumpSetService.updatePumpSetTemp(sValue, deviceInstallEntity.getBuildingId(), deviceInstallEntity.getDeviceAddr()); //更新设定温度
|
|
|
|
|
} |
|
|
|
|
} else if (paramTypeId == 3) { //故障状态
|
|
|
|
|
dataType = "isFault"; |
|
|
|
|
if (dataStr.equals("0")) { |
|
|
|
|
sValue = "无故障"; |
|
|
|
|
} else { |
|
|
|
|
sValue = "有故障"; |
|
|
|
|
} |
|
|
|
|
nowDataService.proWaterTemp(dateStr, deviceInstallEntity.getBuildingId(), deviceInstallEntity.getDeviceAddr()); //保存楼栋时间点温度变化
|
|
|
|
|
log.info("----------------保存楼栋时间点温度变化值!----------------"); |
|
|
|
|
} else { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
@ -742,8 +744,6 @@ public class HeatPumpStrategy implements DeviceStrategy {
|
|
|
|
|
nowDataService.saveNowHistoryData(deviceInstallEntity.getDeviceAddr(), "热泵", sValue, dataType.toString(), deviceInstallEntity.getBuildingId()); |
|
|
|
|
log.info("时间: " + dateStr + "热泵ID:" + deviceInstallEntity.getDeviceAddr() + ",数据: " + dataStr + ",保存数据库成功!楼栋名称:" + deviceInstallEntity.getBuildingName()); |
|
|
|
|
} |
|
|
|
|
nowDataService.proWaterTemp(dateStr, deviceInstallEntity.getBuildingId(), deviceInstallEntity.getDeviceAddr()); //保存楼栋时间点温度变化
|
|
|
|
|
log.info("----------------保存楼栋时间点温度变化值!----------------"); |
|
|
|
|
return sValue; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|