| 
						
						
							
								
							
						
						
					 | 
					@ -6,7 +6,6 @@ import com.epmet.constant.OrgTypeConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.StatsFormDTO; | 
					 | 
					 | 
					import com.epmet.dto.StatsFormDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.extract.result.OrgStatisticsResultDTO; | 
					 | 
					 | 
					import com.epmet.dto.extract.result.OrgStatisticsResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.stats.DimAgencyDTO; | 
					 | 
					 | 
					import com.epmet.dto.stats.DimAgencyDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.stats.DimGridDTO; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.stats.DimGridEntity; | 
					 | 
					 | 
					import com.epmet.entity.stats.DimGridEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.stats.FactPartyMemberVanguardAgencyDailyEntity; | 
					 | 
					 | 
					import com.epmet.entity.stats.FactPartyMemberVanguardAgencyDailyEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.stats.FactPartyMemberVanguardGridDailyEntity; | 
					 | 
					 | 
					import com.epmet.entity.stats.FactPartyMemberVanguardGridDailyEntity; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -16,6 +15,7 @@ import com.epmet.service.stats.*; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.util.DimIdGenerator; | 
					 | 
					 | 
					import com.epmet.util.DimIdGenerator; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import lombok.extern.slf4j.Slf4j; | 
					 | 
					 | 
					import lombok.extern.slf4j.Slf4j; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.apache.commons.collections4.CollectionUtils; | 
					 | 
					 | 
					import org.apache.commons.collections4.CollectionUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import org.apache.commons.collections4.ListUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -191,10 +191,20 @@ public class StatsPartyMemberVanguardServiceImpl implements StatsPartyMemberVang | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
										} | 
					 | 
					 | 
										} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
									}); | 
					 | 
					 | 
									}); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								} | 
					 | 
					 | 
								} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
								//删除旧数据
 | 
					 | 
					 | 
								//删除旧数据 每次删除1000
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
								factPartyMemberVanguardAgencyDailyService.deleteDailyData(customerId, dimId.getDateId()); | 
					 | 
					 | 
								Integer effectRow; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
								//批量插入
 | 
					 | 
					 | 
								do { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
								factPartyMemberVanguardAgencyDailyService.insertBatch(vanguardList); | 
					 | 
					 | 
									effectRow = factPartyMemberVanguardAgencyDailyService.deleteDailyData(customerId, dimId.getDateId(), NumConstant.ONE_THOUSAND); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								} while (effectRow != null && effectRow > NumConstant.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								//批量插入 每次100
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								if (CollectionUtils.isEmpty(vanguardList)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
									log.warn("customerAgencyStats insert list is empty,customerId:{},dateId:{}", customerId, dimId.getDateId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								ListUtils.partition(vanguardList, NumConstant.ONE_HUNDRED) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
										.forEach(part -> factPartyMemberVanguardAgencyDailyService.insertBatch(part)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						/** | 
					 | 
					 | 
						/** | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -327,10 +337,19 @@ public class StatsPartyMemberVanguardServiceImpl implements StatsPartyMemberVang | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
										} | 
					 | 
					 | 
										} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
									}); | 
					 | 
					 | 
									}); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								} | 
					 | 
					 | 
								} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
								//删除旧数据
 | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
								factPartyMemberVanguardGridDailyService.deleteDailyData(customerId, dimId.getDateId()); | 
					 | 
					 | 
								//删除旧数据 每次删除1000
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
								//批量插入
 | 
					 | 
					 | 
								Integer effectRow; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
								factPartyMemberVanguardGridDailyService.insertBatch(vanguardList); | 
					 | 
					 | 
								do { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
									effectRow = factPartyMemberVanguardGridDailyService.deleteDailyData(customerId, dimId.getDateId(), NumConstant.ONE_THOUSAND); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								} while (effectRow != null && effectRow > NumConstant.ZERO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								//批量插入 每次100
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								if (CollectionUtils.isEmpty(vanguardList)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
									log.warn("customerGridStats insert list is empty,customerId:{},dateId:{}", customerId, dimId.getDateId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								ListUtils.partition(vanguardList, NumConstant.ONE_HUNDRED) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
										.forEach(part -> factPartyMemberVanguardGridDailyService.insertBatch(part)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |