From d517dec18cc0919da596f34e7cfef7e933551075 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 12 Apr 2022 16:09:13 +0800 Subject: [PATCH] =?UTF-8?q?tree-ids=CB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BuildingServiceImpl.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java index d178eb7540..4649e18546 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java @@ -297,32 +297,6 @@ public class BuildingServiceImpl implements BuildingService { return result; } result.addAll(customerGridList.stream().map(m -> m.getId()).collect(Collectors.toList())); - List gridList = customerGridList.stream().map(item -> { - BuildingTreeLevelDTO buildingTreeLevelDTO = new BuildingTreeLevelDTO(); - buildingTreeLevelDTO.setId(item.getId()); - buildingTreeLevelDTO.setLabel(item.getGridName()); - buildingTreeLevelDTO.setLevel("grid"); - buildingTreeLevelDTO.setPId(item.getPid()); - buildingTreeLevelDTO.setLongitude(item.getLongitude()); - buildingTreeLevelDTO.setLatitude(item.getLatitude()); - buildingTreeLevelDTO.setChildren(new ArrayList<>()); - //当前网格下有几个小区 - buildingTreeLevelDTO.setShowNum(StrConstant.EPMETY_STR); - return buildingTreeLevelDTO; - }).collect(Collectors.toList()); - - - //3.获取网格下的所有小区 - List gridIdList = customerGridList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList()); - LambdaQueryWrapper queryWrapper = new QueryWrapper().lambda() - .in(IcNeighborHoodEntity::getGridId, gridIdList) - .orderByAsc(IcNeighborHoodEntity::getCreatedTime); - List icNeighborHoodList = icNeighborHoodDao.selectList(queryWrapper); - if(CollectionUtils.isEmpty(icNeighborHoodList)){ - agencyList.addAll(gridList); - return result; - } - result.addAll(icNeighborHoodList.stream().map(m -> m.getId()).collect(Collectors.toList())); return result; }