Browse Source

tree-ids˚

release
zxc 3 years ago
parent
commit
d517dec18c
  1. 26
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java

26
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<BuildingTreeLevelDTO> 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<String> gridIdList = customerGridList.stream().map(BaseEpmetEntity::getId).collect(Collectors.toList());
LambdaQueryWrapper<IcNeighborHoodEntity> queryWrapper = new QueryWrapper<IcNeighborHoodEntity>().lambda()
.in(IcNeighborHoodEntity::getGridId, gridIdList)
.orderByAsc(IcNeighborHoodEntity::getCreatedTime);
List<IcNeighborHoodEntity> 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;
}

Loading…
Cancel
Save