| 
						
						
							
								
							
						
						
					 | 
					@ -45,6 +45,7 @@ import com.epmet.constant.CustomerGridConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dao.*; | 
					 | 
					 | 
					import com.epmet.dao.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.*; | 
					 | 
					 | 
					import com.epmet.dto.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.*; | 
					 | 
					 | 
					import com.epmet.dto.form.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.dto.region.LogOperationResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.result.*; | 
					 | 
					 | 
					import com.epmet.dto.result.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.CustomerAgencyEntity; | 
					 | 
					 | 
					import com.epmet.entity.CustomerAgencyEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.CustomerDepartmentEntity; | 
					 | 
					 | 
					import com.epmet.entity.CustomerDepartmentEntity; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -58,6 +59,8 @@ import com.epmet.feign.OperCrmFeignClient; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.redis.CustomerAgencyRedis; | 
					 | 
					 | 
					import com.epmet.redis.CustomerAgencyRedis; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.service.CustomerAgencyService; | 
					 | 
					 | 
					import com.epmet.service.CustomerAgencyService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.util.ModuleConstant; | 
					 | 
					 | 
					import com.epmet.util.ModuleConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.github.pagehelper.PageHelper; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.github.pagehelper.PageInfo; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import lombok.extern.slf4j.Slf4j; | 
					 | 
					 | 
					import lombok.extern.slf4j.Slf4j; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.apache.commons.collections4.CollectionUtils; | 
					 | 
					 | 
					import org.apache.commons.collections4.CollectionUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1689,19 +1692,40 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public List<CommunityListByAgencyIdResultDTO> getCommunityList(CommunityCountCensusFormDTO dto) { | 
					 | 
					 | 
					    public PageData<CommunityListByAgencyIdResultDTO> getCommunityList(CommunityCountCensusFormDTO dto) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        CustomerAgencyEntity customerAgency = baseDao.selectById(dto.getAgencyId()); | 
					 | 
					 | 
					        CustomerAgencyEntity customerAgency = baseDao.selectById(dto.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (customerAgency!=null){ | 
					 | 
					 | 
					        if (customerAgency!=null){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            String pids = PidUtils.convertPid2OrgIdPath(customerAgency.getId(),customerAgency.getPids()); | 
					 | 
					 | 
					            String pids = PidUtils.convertPid2OrgIdPath(customerAgency.getId(),customerAgency.getPids()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            List<CommunityListByAgencyIdResultDTO>  entityList = baseDao.getCommunityByPidList(pids,dto.getTimeStart(),dto.getTimeEnd()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            entityList.forEach( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    entity->{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        String[] pidArray = entity.getPids().split(":"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        LambdaQueryWrapper<CustomerAgencyEntity> queryWrapper = new LambdaQueryWrapper<CustomerAgencyEntity>().in(CustomerAgencyEntity::getId,pidArray); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        List<CustomerAgencyEntity> customerAgencyEntities = baseDao.selectList(queryWrapper); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        for (CustomerAgencyEntity customerAgencyEntity : customerAgencyEntities) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            if (customerAgencyEntity.getLevel().equals("district")){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                                entity.setDistrictName(customerAgencyEntity.getOrganizationName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            if (customerAgencyEntity.getLevel().equals("street")){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                                entity.setStreeName(customerAgencyEntity.getOrganizationName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            PageInfo<CommunityListByAgencyIdResultDTO> pageInfo = new PageInfo<>(entityList); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return new PageData<>(entityList, pageInfo.getTotal(),dto.getPageSize()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        }else { | 
					 | 
					 | 
					        }else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"获取用户组织信息异常","获取用户组织信息异常"); | 
					 | 
					 | 
					            throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"获取用户组织信息异常","获取用户组织信息异常"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return null; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |