| 
						
						
							
								
							
						
						
					 | 
					@ -24,6 +24,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.constant.FieldConstant; | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.FieldConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.constant.StrConstant; | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.StrConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.enums.PartyOrgTypeEnum; | 
					 | 
					 | 
					import com.epmet.commons.tools.enums.PartyOrgTypeEnum; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.EpmetException; | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.EpmetException; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -32,6 +33,7 @@ import com.epmet.commons.tools.page.PageData; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.redis.RedisKeys; | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.RedisKeys; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.redis.RedisUtils; | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.RedisUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.CustomerOrgRedis; | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.CustomerOrgRedis; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
					 | 
					 | 
					import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1136,7 +1138,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     */ | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO) { | 
					 | 
					 | 
					    public AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        AgencyTreeResultDTO agency = baseDao.getAllAgency(formDTO.getCustomerId()); | 
					 | 
					 | 
					        AgencyTreeResultDTO agency = baseDao.getAllAgency(formDTO.getCustomerId(),null); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        if (CollectionUtils.isEmpty(agency.getSubAgencyList())) { | 
					 | 
					 | 
					        if (CollectionUtils.isEmpty(agency.getSubAgencyList())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            agency.setSubAgencyList(null); | 
					 | 
					 | 
					            agency.setSubAgencyList(null); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } else { | 
					 | 
					 | 
					        } else { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1145,6 +1147,28 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return agency; | 
					 | 
					 | 
					        return agency; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * 工作端,获取当前登录用户所属组织及下级的组织树(不包括网格!!!!!!!!!!) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param formDTO | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @return | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    public AgencyTreeResultDTO getMySubAgencyList(GetAgencyListFormDTO formDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            log.warn("com.epmet.service.impl.CustomerAgencyServiceImpl.getMySubAgencyList,没有找到工作人员所属的机关信息,用户Id:{}", formDTO.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"获取用户组织信息异常","获取用户组织信息异常"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        AgencyTreeResultDTO agency = baseDao.getAllAgency(formDTO.getCustomerId(),staffInfoCacheResult.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (CollectionUtils.isEmpty(agency.getSubAgencyList())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            agency.setSubAgencyList(null); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            setAgencyList(agency.getSubAgencyList()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        return agency; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public AgencyTreeResultDTO getOrgTreeData(String staffId) { | 
					 | 
					 | 
					    public AgencyTreeResultDTO getOrgTreeData(String staffId) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        AgencyTreeResultDTO result = new AgencyTreeResultDTO(); | 
					 | 
					 | 
					        AgencyTreeResultDTO result = new AgencyTreeResultDTO(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |