| 
						
						
							
								
							
						
						
					 | 
					@ -1178,15 +1178,36 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * 从登录用户所属组织开始,包含网格的一颗组织树 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param staffId 如果staffId为空时,从根组织返回 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param customerId | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @return | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public AgencyTreeResultDTO getOrgTreeData(String staffId,String customerId) { | 
					 | 
					 | 
					    public AgencyTreeResultDTO getOrgTreeData(String staffId,String customerId) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        AgencyTreeResultDTO result = new AgencyTreeResultDTO(); | 
					 | 
					 | 
					        AgencyTreeResultDTO result = new AgencyTreeResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        AgencyResultDTO rootAgency=new AgencyResultDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if(StringUtils.isNotBlank(staffId)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //1.查询工作人员所属组织信息
 | 
					 | 
					 | 
					            //1.查询工作人员所属组织信息
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        AgencyResultDTO rootAgency = baseDao.selectAgencyByStaffId(staffId); | 
					 | 
					 | 
					            rootAgency = baseDao.selectAgencyByStaffId(staffId); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            if (null == rootAgency) { | 
					 | 
					 | 
					            if (null == rootAgency) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                logger.error(String.format("查询工作人员所属组织信息失败,staffId->%s", staffId)); | 
					 | 
					 | 
					                logger.error(String.format("查询工作人员所属组织信息失败,staffId->%s", staffId)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                throw new RenException(CustomerAgencyConstant.SELECT_STAFF_AGENCY_EXCEPTION); | 
					 | 
					 | 
					                throw new RenException(CustomerAgencyConstant.SELECT_STAFF_AGENCY_EXCEPTION); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            LambdaQueryWrapper<CustomerAgencyEntity> rootQuery=new LambdaQueryWrapper<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            rootQuery.eq(CustomerAgencyEntity::getCustomerId,customerId) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    .eq(CustomerAgencyEntity::getPid,NumConstant.ZERO_STR); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            CustomerAgencyEntity rootEntity=baseDao.selectOne(rootQuery); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            rootAgency.setAgencyId(rootEntity.getId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            rootAgency.setAgencyName(rootEntity.getOrganizationName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            rootAgency.setPids(rootEntity.getPids()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            rootAgency.setPid(rootEntity.getPid()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            rootAgency.setLevel(rootEntity.getLevel()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            rootAgency.setLongitude(rootEntity.getLongitude()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            rootAgency.setLatitude(rootEntity.getLatitude()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        result.setPid(rootAgency.getPid()); | 
					 | 
					 | 
					        result.setPid(rootAgency.getPid()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        result.setAgencyName(rootAgency.getAgencyName()); | 
					 | 
					 | 
					        result.setAgencyName(rootAgency.getAgencyName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        result.setAgencyId(rootAgency.getAgencyId()); | 
					 | 
					 | 
					        result.setAgencyId(rootAgency.getAgencyId()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |