| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -26,6 +26,7 @@ import com.epmet.dto.stats.DimCustomerDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.entity.crm.CustomerRelationEntity; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.service.crm.CustomerRelationService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.service.stats.DimCustomerService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import lombok.extern.slf4j.Slf4j; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.springframework.util.CollectionUtils; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -42,6 +43,7 @@ import java.util.stream.Collectors; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * @author generator generator@elink-cn.com | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * @since v1.0.0 2021-01-14 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					@Slf4j | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					@DataSource(DataSourceConstant.OPER_CRM) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					@Service | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					public class CustomerRelationServiceImpl extends BaseServiceImpl<CustomerRelationDao, CustomerRelationEntity> implements CustomerRelationService { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -60,13 +62,13 @@ public class CustomerRelationServiceImpl extends BaseServiceImpl<CustomerRelatio | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<CustomerSubInfoDTO> list=new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        for(String customerId:customerIds){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            CustomerSubInfoDTO customerSubInfoDTO = baseDao.selectCustomerSubInfo(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if(null!=customerSubInfoDTO){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                DimCustomerDTO dimCustomerDTO=dimCustomerService.get(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if(null!=dimCustomerDTO){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    customerSubInfoDTO.setCustomerName(dimCustomerDTO.getCustomerName()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                list.add(customerSubInfoDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if(null==customerSubInfoDTO){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                log.info(String.format("当前客户customerId: %s, 没有下一级客户 ",customerId)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                continue; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            DimCustomerDTO dimCustomerDTO=dimCustomerService.get(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            customerSubInfoDTO.setCustomerName(dimCustomerDTO.getCustomerName()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            list.add(customerSubInfoDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(CollectionUtils.isEmpty(list)){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return new HashMap<>(); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |