From bf81ca52c9cb517990ce84931bcd60e721c41c07 Mon Sep 17 00:00:00 2001 From: 25604 Date: Fri, 7 Nov 2025 17:55:45 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E7=94=9F=E6=B4=BB=E6=B0=B4=E7=AE=B1?= =?UTF-8?q?=E6=B6=B2=E4=BD=8D=E5=89=8D=E5=90=8E=E7=AB=AF=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionParamsManageServiceImpl.java | 40 +++++++++++++++++-- .../space/impl/HouseInfoServiceImpl.java | 6 ++- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/mh-system/src/main/java/com/mh/system/service/device/impl/CollectionParamsManageServiceImpl.java b/mh-system/src/main/java/com/mh/system/service/device/impl/CollectionParamsManageServiceImpl.java index 7147fca..d971415 100644 --- a/mh-system/src/main/java/com/mh/system/service/device/impl/CollectionParamsManageServiceImpl.java +++ b/mh-system/src/main/java/com/mh/system/service/device/impl/CollectionParamsManageServiceImpl.java @@ -656,10 +656,24 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag @Override public List monitorList(String systemType, String floorId) { // 根据楼栋id查询对应的楼层列表,根据_进行分割 - List floorList = Arrays.asList(floorId.split("_")); + if (systemType.equals("6")) { + return lifeWaterLevel(systemType, floorId); + } + List floorList = null; + if (floorId.contains("_")) { + floorList = List.of(floorId.split("_")); + } else { + floorList = new ArrayList<>(); + floorList.add(floorId); + } String buildingId = floorList.get(0); - String floorName = floorList.get(1); - List floorInfos = floorInfoMapper.selectList(new LambdaQueryWrapper().eq(FloorInfo::getBuildingId, buildingId).like(FloorInfo::getFloorName, floorName)); + List floorInfos = new ArrayList<>(); + if (floorList.size() == 1) { + floorInfos = floorInfoMapper.selectList(new LambdaQueryWrapper().eq(FloorInfo::getBuildingId, buildingId)); + } else { + String floorName = floorList.get(1); + floorInfos = floorInfoMapper.selectList(new LambdaQueryWrapper().eq(FloorInfo::getBuildingId, buildingId).like(FloorInfo::getFloorName, floorName)); + } if (floorInfos.isEmpty()) { return List.of(); } @@ -882,6 +896,26 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag .collect(Collectors.toList()); } + private List lifeWaterLevel(String systemType, String floorId) { + List lifeWaterLevel = collectionParamsManageMapper.selectHotWaterBySystemTypeAndBuildingIdAndDeviceType(systemType, floorId, "16"); + List list = lifeWaterLevel.stream().filter(vo -> "11".equals(vo.getParamType())).toList(); + if (!list.isEmpty()) { + return list.stream().map(vo -> { + HotWaterNowDataDTO dto = new HotWaterNowDataDTO(); + dto.setId(vo.getId()); + dto.setCurDate(vo.getCollectTime().toString()); + dto.setBuildingId(vo.getDeviceLedgerId()); + dto.setBuildingName(vo.getDeviceName()); + dto.setTankId(vo.getDeviceLedgerId()); + dto.setTankName(vo.getDeviceName()); + dto.setWaterLevel1(vo.getCollectValue()); + dto.setOrderNum(1); + return dto; + }).collect(Collectors.toList()); + } + return null; + } + @Override public List operateList(String systemType, String floorId) { List hotWaterControlListVOS = collectionParamsManageMapper.selectHotWaterBySystemTypeAndBuildingId(systemType, floorId); diff --git a/mh-system/src/main/java/com/mh/system/service/space/impl/HouseInfoServiceImpl.java b/mh-system/src/main/java/com/mh/system/service/space/impl/HouseInfoServiceImpl.java index 18d8400..74c73dd 100644 --- a/mh-system/src/main/java/com/mh/system/service/space/impl/HouseInfoServiceImpl.java +++ b/mh-system/src/main/java/com/mh/system/service/space/impl/HouseInfoServiceImpl.java @@ -284,7 +284,11 @@ public class HouseInfoServiceImpl implements IHouseInfoService { public List buildFloorTree(String systemType) { QueryWrapper areaInfoQueryWrapper = new QueryWrapper<>(); if (!StringUtils.isEmpty(systemType)) { - areaInfoQueryWrapper.eq("system_type", systemType); + if ("1".equals(systemType)) { + areaInfoQueryWrapper.in("system_type", "1", "6"); + } else { + areaInfoQueryWrapper.eq("system_type", systemType); + } } areaInfoQueryWrapper.orderByAsc("order_num"); List areaInfos = areaInfoMapper.selectList(areaInfoQueryWrapper);