|  | @ -25,7 +25,6 @@ import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
		
			
				
					|  |  | 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; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.page.PageData; |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.security.dto.TokenDto; |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 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; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.constant.CustomerAgencyConstant; |  |  | import com.epmet.constant.CustomerAgencyConstant; | 
			
		
	
	
		
		
			
				
					|  | @ -1091,16 +1090,38 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     /** |  |  |     /** | 
			
		
	
		
		
			
				
					|  |  |      * @param tokenDTO |  |  |  | 
			
		
	
		
		
			
				
					|  |  |      * @Description 获取客户下组织树 |  |  |      * @Description 获取客户下组织树 | 
			
		
	
		
		
			
				
					
					|  |  |      * @Param tokenDTO |  |  |      * @Param formDTO | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |      * @Return {@link AgencyTreeResultDTO} |  |  |      * @Return {@link AgencyTreeResultDTO} | 
			
		
	
		
		
			
				
					|  |  |      * @Author zhaoqifeng |  |  |      * @Author zhaoqifeng | 
			
		
	
		
		
			
				
					|  |  |      * @Date 2021/9/8 15:21 |  |  |      * @Date 2021/9/8 15:21 | 
			
		
	
		
		
			
				
					|  |  |      */ |  |  |      */ | 
			
		
	
		
		
			
				
					|  |  |     @Override |  |  |     @Override | 
			
		
	
		
		
			
				
					|  |  |     public AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO) { |  |  |     public AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO) { | 
			
		
	
		
		
			
				
					
					|  |  |         return baseDao.getAllAgency(formDTO.getCustomerId()); |  |  |         AgencyTreeResultDTO agency = baseDao.getAllAgency(formDTO.getCustomerId()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |         if (CollectionUtils.isEmpty(agency.getSubAgencyList())) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             agency.setSubAgencyList(null); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } else { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             setAgencyList(agency.getSubAgencyList()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         return agency; | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     /** | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      * @Description 组织树最后一级没有数据的话设null | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      * @Param agencyList | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      * @Return | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      * @Author zhaoqifeng | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      * @Date 2021/9/18 14:33 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |      */ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     private void setAgencyList(List<AgencyTreeResultDTO> agencyList) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         for (AgencyTreeResultDTO dto : agencyList) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             if (CollectionUtils.isEmpty(dto.getSubAgencyList())) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 dto.setSubAgencyList(null); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             } else { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 setAgencyList(dto.getSubAgencyList()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | } |  |  | } |