|  | @ -870,11 +870,13 @@ public class StatsPublicityServiceImpl implements StatsPublicityService { | 
			
		
	
		
		
			
				
					|  |  | 	 */ |  |  | 	 */ | 
			
		
	
		
		
			
				
					|  |  | 	private void statsTagViewedQuarterly(String quarterId, String customerId) { |  |  | 	private void statsTagViewedQuarterly(String quarterId, String customerId) { | 
			
		
	
		
		
			
				
					|  |  | 		List<FactTagViewedGridMonthlyEntity> gridMonthlyList = factTagViewedGridMonthlyService.getTagViewedCountByQuarterId(customerId, quarterId); |  |  | 		List<FactTagViewedGridMonthlyEntity> gridMonthlyList = factTagViewedGridMonthlyService.getTagViewedCountByQuarterId(customerId, quarterId); | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 		log.debug("statsTagViewedQuarterly grid quarterId:{},customerId:{},result:{}",quarterId,customerId,JSON.toJSONString(gridMonthlyList)); | 
			
		
	
		
		
			
				
					|  |  | 		if (!CollectionUtils.isEmpty(gridMonthlyList)) { |  |  | 		if (!CollectionUtils.isEmpty(gridMonthlyList)) { | 
			
		
	
		
		
			
				
					|  |  | 			List<FactTagViewedGridQuarterlyEntity> gridQuarterlyList = ConvertUtils.sourceToTarget(gridMonthlyList, FactTagViewedGridQuarterlyEntity.class); |  |  | 			List<FactTagViewedGridQuarterlyEntity> gridQuarterlyList = ConvertUtils.sourceToTarget(gridMonthlyList, FactTagViewedGridQuarterlyEntity.class); | 
			
		
	
		
		
			
				
					|  |  | 			factTagViewedGridQuarterlyService.deleteAndInsertByQuarterId(customerId, quarterId, gridQuarterlyList); |  |  | 			factTagViewedGridQuarterlyService.deleteAndInsertByQuarterId(customerId, quarterId, gridQuarterlyList); | 
			
		
	
		
		
			
				
					|  |  | 		} |  |  | 		} | 
			
		
	
		
		
			
				
					|  |  | 		List<FactTagViewedAgencyMonthlyEntity> agencyMonthlyList = factTagViewedAgencyMonthlyService.getTagViewedCountByQuarterId(customerId, quarterId); |  |  | 		List<FactTagViewedAgencyMonthlyEntity> agencyMonthlyList = factTagViewedAgencyMonthlyService.getTagViewedCountByQuarterId(customerId, quarterId); | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 		log.debug("statsTagViewedQuarterly agency quarterId:{},customerId:{},result:{}",quarterId,customerId,JSON.toJSONString(gridMonthlyList)); | 
			
		
	
		
		
			
				
					|  |  | 		if (!CollectionUtils.isEmpty(agencyMonthlyList)) { |  |  | 		if (!CollectionUtils.isEmpty(agencyMonthlyList)) { | 
			
		
	
		
		
			
				
					|  |  | 			List<FactTagViewedAgencyQuarterlyEntity> agencyQuarterlyList = ConvertUtils.sourceToTarget(agencyMonthlyList, FactTagViewedAgencyQuarterlyEntity.class); |  |  | 			List<FactTagViewedAgencyQuarterlyEntity> agencyQuarterlyList = ConvertUtils.sourceToTarget(agencyMonthlyList, FactTagViewedAgencyQuarterlyEntity.class); | 
			
		
	
		
		
			
				
					|  |  | 			factTagViewedAgencyQuarterlyService.deleteAndInsertByQuarterId(customerId, quarterId, agencyQuarterlyList); |  |  | 			factTagViewedAgencyQuarterlyService.deleteAndInsertByQuarterId(customerId, quarterId, agencyQuarterlyList); | 
			
		
	
	
		
		
			
				
					|  | @ -913,11 +915,13 @@ public class StatsPublicityServiceImpl implements StatsPublicityService { | 
			
		
	
		
		
			
				
					|  |  | 	 */ |  |  | 	 */ | 
			
		
	
		
		
			
				
					|  |  | 	private void statsTagViewedYearly(String yearId, String customerId) { |  |  | 	private void statsTagViewedYearly(String yearId, String customerId) { | 
			
		
	
		
		
			
				
					|  |  | 		List<FactTagViewedGridMonthlyEntity> gridMonthlyList = factTagViewedGridMonthlyService.getTagViewedCountByYearId(customerId, yearId); |  |  | 		List<FactTagViewedGridMonthlyEntity> gridMonthlyList = factTagViewedGridMonthlyService.getTagViewedCountByYearId(customerId, yearId); | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 		log.debug("statsTagViewedYearly grid yearId:{},customerId:{},result:{}",yearId,customerId,JSON.toJSONString(gridMonthlyList)); | 
			
		
	
		
		
			
				
					|  |  | 		if (!CollectionUtils.isEmpty(gridMonthlyList)) { |  |  | 		if (!CollectionUtils.isEmpty(gridMonthlyList)) { | 
			
		
	
		
		
			
				
					|  |  | 			List<FactTagViewedGridYearlyEntity> gridYearlyList = ConvertUtils.sourceToTarget(gridMonthlyList, FactTagViewedGridYearlyEntity.class); |  |  | 			List<FactTagViewedGridYearlyEntity> gridYearlyList = ConvertUtils.sourceToTarget(gridMonthlyList, FactTagViewedGridYearlyEntity.class); | 
			
		
	
		
		
			
				
					|  |  | 			factTagViewedGridYearlyService.deleteAndInsertByYearId(customerId, yearId, gridYearlyList); |  |  | 			factTagViewedGridYearlyService.deleteAndInsertByYearId(customerId, yearId, gridYearlyList); | 
			
		
	
		
		
			
				
					|  |  | 		} |  |  | 		} | 
			
		
	
		
		
			
				
					|  |  | 		List<FactTagViewedAgencyMonthlyEntity> agencyMonthlyList = factTagViewedAgencyMonthlyService.getTagViewedCountByYearId(customerId, yearId); |  |  | 		List<FactTagViewedAgencyMonthlyEntity> agencyMonthlyList = factTagViewedAgencyMonthlyService.getTagViewedCountByYearId(customerId, yearId); | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 		log.debug("statsTagViewedYearly agency yearId:{},customerId:{},result:{}",yearId,customerId,JSON.toJSONString(agencyMonthlyList)); | 
			
		
	
		
		
			
				
					|  |  | 		if (!CollectionUtils.isEmpty(agencyMonthlyList)) { |  |  | 		if (!CollectionUtils.isEmpty(agencyMonthlyList)) { | 
			
		
	
		
		
			
				
					|  |  | 			List<FactTagViewedAgencyYearlyEntity> agencyYearlyList = ConvertUtils.sourceToTarget(agencyMonthlyList, FactTagViewedAgencyYearlyEntity.class); |  |  | 			List<FactTagViewedAgencyYearlyEntity> agencyYearlyList = ConvertUtils.sourceToTarget(agencyMonthlyList, FactTagViewedAgencyYearlyEntity.class); | 
			
		
	
		
		
			
				
					|  |  | 			factTagViewedAgencyYearlyService.deleteAndInsertByYearId(customerId, yearId, agencyYearlyList); |  |  | 			factTagViewedAgencyYearlyService.deleteAndInsertByYearId(customerId, yearId, agencyYearlyList); | 
			
		
	
	
		
		
			
				
					|  | @ -957,8 +961,8 @@ public class StatsPublicityServiceImpl implements StatsPublicityService { | 
			
		
	
		
		
			
				
					|  |  | 		String key = pid.concat(StrConstant.UNDER_LINE).concat(tagId); |  |  | 		String key = pid.concat(StrConstant.UNDER_LINE).concat(tagId); | 
			
		
	
		
		
			
				
					|  |  | 		FactTagViewedAgencyDailyEntity parentAgencyDailyEntity = agencyDailyEntityMap.get(key); |  |  | 		FactTagViewedAgencyDailyEntity parentAgencyDailyEntity = agencyDailyEntityMap.get(key); | 
			
		
	
		
		
			
				
					|  |  | 		DimAgencyEntity currentDimAgency = dimAgencyEntityMap.get(pid); |  |  | 		DimAgencyEntity currentDimAgency = dimAgencyEntityMap.get(pid); | 
			
		
	
		
		
			
				
					
					|  |  | 		if (currentDimAgency == null) { |  |  | 		if (currentDimAgency == null && !NumConstant.ZERO_STR.equals(pid)) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 			log.error("setTagViewedData2ParentAgency pid:{} not exist in dimAgency", pid); |  |  | 			log.error("setTagViewedData2ParentAgency agencyId:{} not exist in dimAgency", pid); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  | 			return; |  |  | 			return; | 
			
		
	
		
		
			
				
					|  |  | 		} |  |  | 		} | 
			
		
	
		
		
			
				
					|  |  | 		if (parentAgencyDailyEntity == null) { |  |  | 		if (parentAgencyDailyEntity == null) { | 
			
		
	
	
		
		
			
				
					|  | @ -982,8 +986,8 @@ public class StatsPublicityServiceImpl implements StatsPublicityService { | 
			
		
	
		
		
			
				
					|  |  | 	private void setPublishedData2ParentAgency(Map<String, FactArticlePublishedAgencyDailyEntity> agencyDailyEntityMap, FactArticlePublishedAgencyDailyEntity agencySummary, FactArticlePublishedAgencyDailyEntity summary) { |  |  | 	private void setPublishedData2ParentAgency(Map<String, FactArticlePublishedAgencyDailyEntity> agencyDailyEntityMap, FactArticlePublishedAgencyDailyEntity agencySummary, FactArticlePublishedAgencyDailyEntity summary) { | 
			
		
	
		
		
			
				
					|  |  | 		String pid = summary.getPid(); |  |  | 		String pid = summary.getPid(); | 
			
		
	
		
		
			
				
					|  |  | 		FactArticlePublishedAgencyDailyEntity parentAgency = agencyDailyEntityMap.get(pid); |  |  | 		FactArticlePublishedAgencyDailyEntity parentAgency = agencyDailyEntityMap.get(pid); | 
			
		
	
		
		
			
				
					
					|  |  | 		if (parentAgency == null) { |  |  | 		if (parentAgency == null && !NumConstant.ZERO_STR.equals(pid)) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 			log.error("setPublishedData2ParentAgency pid:{} not exist in dimAgency", pid); |  |  | 			log.error("setPublishedData2ParentAgency agencyId:{} not exist in dimAgency", pid); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  | 			return; |  |  | 			return; | 
			
		
	
		
		
			
				
					|  |  | 		} |  |  | 		} | 
			
		
	
		
		
			
				
					|  |  | 		parentAgency.setArticleTotalCount(parentAgency.getArticleTotalCount() + agencySummary.getArticleTotalCount()); |  |  | 		parentAgency.setArticleTotalCount(parentAgency.getArticleTotalCount() + agencySummary.getArticleTotalCount()); | 
			
		
	
	
		
		
			
				
					|  | 
 |