| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -135,10 +135,15 @@ public class StatsGroupServiceImpl implements StatsGroupService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (customerIds.size() != NumConstant.ZERO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(formDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                customerIds.forEach(customerId -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    Boolean status = true; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        List<DimAgencyDTO> customerAgencyInfos = dimAgencyService.getAgencyInfoByCustomerId(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        List<AgencyGroupDailyResultDTO> agencyGroupDaily = this.getAgencyGroupDaily(customerAgencyInfos, dimIdBean, customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        factGroupAgencyDailyService.insertGroupAgencyDaily(agencyGroupDaily, customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        List<List<DimAgencyDTO>> partition = ListUtils.partition(customerAgencyInfos, NumConstant.ONE_HUNDRED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        for (List<DimAgencyDTO> p : partition) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            List<AgencyGroupDailyResultDTO> agencyGroupDaily = this.getAgencyGroupDaily(p, dimIdBean, customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            factGroupAgencyDailyService.insertGroupAgencyDaily(agencyGroupDaily, customerId,status); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            status = false; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } catch (Exception e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        log.error(String.format(GroupConstant.STATS_FAILED_AGENCY_DAILY, customerId, LocalDate.now(), e)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |