|  | @ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
			
		
	
		
		
			
				
					|  |  | import com.baomidou.mybatisplus.core.metadata.IPage; |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
			
		
	
		
		
			
				
					|  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |  |  | import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.commons.tools.constant.StrConstant; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.RenException; |  |  | import com.epmet.commons.tools.exception.RenException; | 
			
		
	
	
		
		
			
				
					|  | @ -126,6 +128,8 @@ public class BuildingServiceImpl implements BuildingService { | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setLongitude(item.getLongitude()); |  |  |             buildingTreeLevelDTO.setLongitude(item.getLongitude()); | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setLatitude(item.getLatitude()); |  |  |             buildingTreeLevelDTO.setLatitude(item.getLatitude()); | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setChildren(new ArrayList<>()); |  |  |             buildingTreeLevelDTO.setChildren(new ArrayList<>()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             //当前组织有几个下级组织
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             buildingTreeLevelDTO.setShowNum(StrConstant.EPMETY_STR); | 
			
		
	
		
		
			
				
					|  |  |             return buildingTreeLevelDTO; |  |  |             return buildingTreeLevelDTO; | 
			
		
	
		
		
			
				
					|  |  |         }).collect(Collectors.toList()); |  |  |         }).collect(Collectors.toList()); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -149,6 +153,8 @@ public class BuildingServiceImpl implements BuildingService { | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setLongitude(item.getLongitude()); |  |  |             buildingTreeLevelDTO.setLongitude(item.getLongitude()); | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setLatitude(item.getLatitude()); |  |  |             buildingTreeLevelDTO.setLatitude(item.getLatitude()); | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setChildren(new ArrayList<>()); |  |  |             buildingTreeLevelDTO.setChildren(new ArrayList<>()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             //当前网格下有几个小区
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             buildingTreeLevelDTO.setShowNum(StrConstant.EPMETY_STR); | 
			
		
	
		
		
			
				
					|  |  |             return buildingTreeLevelDTO; |  |  |             return buildingTreeLevelDTO; | 
			
		
	
		
		
			
				
					|  |  |         }).collect(Collectors.toList()); |  |  |         }).collect(Collectors.toList()); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -172,6 +178,8 @@ public class BuildingServiceImpl implements BuildingService { | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setLongitude(item.getLongitude()); |  |  |             buildingTreeLevelDTO.setLongitude(item.getLongitude()); | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setLatitude(item.getLatitude()); |  |  |             buildingTreeLevelDTO.setLatitude(item.getLatitude()); | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setChildren(new ArrayList<>()); |  |  |             buildingTreeLevelDTO.setChildren(new ArrayList<>()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             //当前小区下,有几栋楼
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             buildingTreeLevelDTO.setShowNum(StrConstant.EPMETY_STR); | 
			
		
	
		
		
			
				
					|  |  |             return buildingTreeLevelDTO; |  |  |             return buildingTreeLevelDTO; | 
			
		
	
		
		
			
				
					|  |  |         }).collect(Collectors.toList()); |  |  |         }).collect(Collectors.toList()); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -198,6 +206,25 @@ public class BuildingServiceImpl implements BuildingService { | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setLongitude(item.getLongitude()); |  |  |             buildingTreeLevelDTO.setLongitude(item.getLongitude()); | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setLatitude(item.getLatitude()); |  |  |             buildingTreeLevelDTO.setLatitude(item.getLatitude()); | 
			
		
	
		
		
			
				
					|  |  |             buildingTreeLevelDTO.setChildren(new ArrayList<>()); |  |  |             buildingTreeLevelDTO.setChildren(new ArrayList<>()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             //当前楼栋共有多少户,有多少户有人住
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             buildingTreeLevelDTO.setShowNum(StrConstant.EPMETY_STR); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             // 总单元数
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             Integer totalUnitNum = null == item.getTotalUnitNum() ? NumConstant.ZERO : item.getTotalUnitNum(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             // 总楼层总数
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             Integer totalFloorNum = null == item.getTotalFloorNum() ? NumConstant.ZERO : item.getTotalFloorNum(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             // *总户数
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             Integer totalHouseNum = null == item.getTotalHouseNum() ? NumConstant.ZERO : item.getTotalHouseNum(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             //总户数=以上三个数相乘
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             Integer total=totalUnitNum*totalFloorNum*totalHouseNum; | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             //已经添加了多少户
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             LambdaQueryWrapper<IcHouseEntity> icHouseEntityWrapper = new QueryWrapper<IcHouseEntity>().lambda() | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     .in(IcHouseEntity::getBuildingId, item.getId()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             int count= icHouseDao.selectCount(icHouseEntityWrapper); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             if(NumConstant.ZERO==total){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 buildingTreeLevelDTO.setShowNum(String.format("%s/%s",count,count)); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             }else{ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 buildingTreeLevelDTO.setShowNum(String.format("%s/%s",count,total)); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |             return buildingTreeLevelDTO; |  |  |             return buildingTreeLevelDTO; | 
			
		
	
		
		
			
				
					|  |  |         }).collect(Collectors.toList()); |  |  |         }).collect(Collectors.toList()); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -400,7 +427,9 @@ public class BuildingServiceImpl implements BuildingService { | 
			
		
	
		
		
			
				
					|  |  |             recursionCovertToTree(agencyEntity,customerAgencyList); |  |  |             recursionCovertToTree(agencyEntity,customerAgencyList); | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |         parent.setChildren(subList); |  |  |         parent.setChildren(subList); | 
			
		
	
		
		
			
				
					
					|  |  | 
 |  |  |         if(!"building".equals(parent.getLevel())){ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |             parent.setShowNum(CollectionUtils.isEmpty(subList) ? NumConstant.ZERO_STR : String.valueOf(subList.size())); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | 
 |