|
|
@ -29,6 +29,7 @@ public class HeatPumpStrategy implements DeviceStrategy { |
|
|
|
NowPublicDataService nowPublicDataService = context.getBean(NowPublicDataService.class); |
|
|
|
NowPublicDataService nowPublicDataService = context.getBean(NowPublicDataService.class); |
|
|
|
PumpSetService pumpSetService = context.getBean(PumpSetService.class); |
|
|
|
PumpSetService pumpSetService = context.getBean(PumpSetService.class); |
|
|
|
DeviceInstallService deviceInstallService = context.getBean(DeviceInstallService.class); |
|
|
|
DeviceInstallService deviceInstallService = context.getBean(DeviceInstallService.class); |
|
|
|
|
|
|
|
DealDataService dealDataService = context.getBean(DealDataService.class); |
|
|
|
|
|
|
|
|
|
|
|
private static class SingletonHolder { |
|
|
|
private static class SingletonHolder { |
|
|
|
private static final HeatPumpStrategy INSTANCE = new HeatPumpStrategy(); |
|
|
|
private static final HeatPumpStrategy INSTANCE = new HeatPumpStrategy(); |
|
|
@ -267,6 +268,11 @@ public class HeatPumpStrategy implements DeviceStrategy { |
|
|
|
publicData.setUseWaterTemp(avgTemp); |
|
|
|
publicData.setUseWaterTemp(avgTemp); |
|
|
|
publicData.setBackWaterTemp(avgTemp); |
|
|
|
publicData.setBackWaterTemp(avgTemp); |
|
|
|
String pumpId = nowDataService.selectMinPumpId(buildingId); |
|
|
|
String pumpId = nowDataService.selectMinPumpId(buildingId); |
|
|
|
|
|
|
|
// 如果是华夏,则取新增得字段标识为热泵ID
|
|
|
|
|
|
|
|
String name = dealDataService.customName(); |
|
|
|
|
|
|
|
if (name.contains(Constant.CUSTOM_NAME_HUAXIA)) { |
|
|
|
|
|
|
|
pumpId = deviceInstallService.selectSinglePumpId(buildingId, addr); |
|
|
|
|
|
|
|
} |
|
|
|
log.info("---------------addr:" + addr + ",pumpId:" + pumpId + " ---------------"); |
|
|
|
log.info("---------------addr:" + addr + ",pumpId:" + pumpId + " ---------------"); |
|
|
|
if (addr.equals(pumpId)) { //取ID最小的热泵为单箱温度
|
|
|
|
if (addr.equals(pumpId)) { //取ID最小的热泵为单箱温度
|
|
|
|
publicData.setSingleTemp(sValue); |
|
|
|
publicData.setSingleTemp(sValue); |
|
|
@ -345,6 +351,11 @@ public class HeatPumpStrategy implements DeviceStrategy { |
|
|
|
// 回水温度
|
|
|
|
// 回水温度
|
|
|
|
publicData.setBackWaterTemp(avgTemp); |
|
|
|
publicData.setBackWaterTemp(avgTemp); |
|
|
|
String pumpId = nowDataService.selectMinPumpId(buildingId); |
|
|
|
String pumpId = nowDataService.selectMinPumpId(buildingId); |
|
|
|
|
|
|
|
// 如果是华夏,则取新增得字段标识为热泵ID
|
|
|
|
|
|
|
|
String name = dealDataService.customName(); |
|
|
|
|
|
|
|
if (name.contains(Constant.CUSTOM_NAME_HUAXIA)) { |
|
|
|
|
|
|
|
pumpId = deviceInstallService.selectSinglePumpId(buildingId, addr); |
|
|
|
|
|
|
|
} |
|
|
|
log.info("---------------addr:" + addr + ",pumpId:" + pumpId + " ---------------"); |
|
|
|
log.info("---------------addr:" + addr + ",pumpId:" + pumpId + " ---------------"); |
|
|
|
if (addr.equals(pumpId)) { //取ID最小的热泵为单箱温度
|
|
|
|
if (addr.equals(pumpId)) { //取ID最小的热泵为单箱温度
|
|
|
|
publicData.setSingleTemp(sValue); |
|
|
|
publicData.setSingleTemp(sValue); |
|
|
@ -435,6 +446,11 @@ public class HeatPumpStrategy implements DeviceStrategy { |
|
|
|
publicData.setUseWaterTemp(avgTemp); |
|
|
|
publicData.setUseWaterTemp(avgTemp); |
|
|
|
publicData.setBackWaterTemp(avgTemp); |
|
|
|
publicData.setBackWaterTemp(avgTemp); |
|
|
|
String pumpId = nowDataService.selectMinPumpId(buildingId); |
|
|
|
String pumpId = nowDataService.selectMinPumpId(buildingId); |
|
|
|
|
|
|
|
// 如果是华夏,则取新增得字段标识为热泵ID
|
|
|
|
|
|
|
|
String name = dealDataService.customName(); |
|
|
|
|
|
|
|
if (name.contains(Constant.CUSTOM_NAME_HUAXIA)) { |
|
|
|
|
|
|
|
pumpId = deviceInstallService.selectSinglePumpId(buildingId, addr); |
|
|
|
|
|
|
|
} |
|
|
|
if (addr.equals(pumpId)) { //取ID最小的热泵为单箱温度
|
|
|
|
if (addr.equals(pumpId)) { //取ID最小的热泵为单箱温度
|
|
|
|
publicData.setSingleTemp(sValue); |
|
|
|
publicData.setSingleTemp(sValue); |
|
|
|
log.info("---------------单箱温度:" + sValue + "---------------"); |
|
|
|
log.info("---------------单箱温度:" + sValue + "---------------"); |
|
|
@ -510,6 +526,11 @@ public class HeatPumpStrategy implements DeviceStrategy { |
|
|
|
publicData.setUseWaterTemp(avgTemp); |
|
|
|
publicData.setUseWaterTemp(avgTemp); |
|
|
|
publicData.setBackWaterTemp(avgTemp); |
|
|
|
publicData.setBackWaterTemp(avgTemp); |
|
|
|
String pumpId = nowDataService.selectMinPumpId(buildingId); |
|
|
|
String pumpId = nowDataService.selectMinPumpId(buildingId); |
|
|
|
|
|
|
|
// 如果是华夏,则取新增得字段标识为热泵ID
|
|
|
|
|
|
|
|
String name = dealDataService.customName(); |
|
|
|
|
|
|
|
if (name.contains(Constant.CUSTOM_NAME_HUAXIA)) { |
|
|
|
|
|
|
|
pumpId = deviceInstallService.selectSinglePumpId(buildingId, addr); |
|
|
|
|
|
|
|
} |
|
|
|
log.info("---------------addr:" + addr + ",pumpId:" + pumpId + " ---------------"); |
|
|
|
log.info("---------------addr:" + addr + ",pumpId:" + pumpId + " ---------------"); |
|
|
|
if (addr.equals(pumpId)) { //取ID最小的热泵为单箱温度
|
|
|
|
if (addr.equals(pumpId)) { //取ID最小的热泵为单箱温度
|
|
|
|
publicData.setSingleTemp(sValue); |
|
|
|
publicData.setSingleTemp(sValue); |
|
|
|