|  |  | @ -33,9 +33,11 @@ import com.epmet.dto.group.result.AgencyGroupMonthlyResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.stats.FactGroupAgencyDailyDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.stats.FactGroupAgencyDailyEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.stats.FactGroupAgencyDailyService; | 
			
		
	
		
			
				
					|  |  |  | import org.apache.commons.collections4.ListUtils; | 
			
		
	
		
			
				
					|  |  |  | import org.apache.commons.lang3.StringUtils; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.util.CollectionUtils; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import java.util.ArrayList; | 
			
		
	
		
			
				
					|  |  |  | import java.util.Arrays; | 
			
		
	
	
		
			
				
					|  |  | @ -112,11 +114,16 @@ public class FactGroupAgencyDailyServiceImpl extends BaseServiceImpl<FactGroupAg | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public void insertGroupAgencyDaily(List<AgencyGroupDailyResultDTO> agencyList,String customerId) { | 
			
		
	
		
			
				
					|  |  |  |         if (agencyList.size() != NumConstant.ZERO){ | 
			
		
	
		
			
				
					|  |  |  |             baseDao.deleteInsertAgencyDailyByDateId(agencyList.get(NumConstant.ZERO).getDateId(),customerId); | 
			
		
	
		
			
				
					|  |  |  |             baseDao.insertGroupAgencyDaily(agencyList); | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(agencyList)){ | 
			
		
	
		
			
				
					|  |  |  |             Integer delNum; | 
			
		
	
		
			
				
					|  |  |  |             do { | 
			
		
	
		
			
				
					|  |  |  |                 delNum = baseDao.deleteInsertAgencyDailyByDateId(agencyList.get(NumConstant.ZERO).getDateId(),customerId); | 
			
		
	
		
			
				
					|  |  |  |             }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); | 
			
		
	
		
			
				
					|  |  |  |             List<List<AgencyGroupDailyResultDTO>> partition = ListUtils.partition(agencyList, NumConstant.ONE_HUNDRED); | 
			
		
	
		
			
				
					|  |  |  |             partition.forEach(p -> { | 
			
		
	
		
			
				
					|  |  |  |                 baseDao.insertGroupAgencyDaily(p); | 
			
		
	
		
			
				
					|  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
	
		
			
				
					|  |  | 
 |