|
|
@ -451,20 +451,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService { |
|
|
|
try { |
|
|
|
//转换为 需要插入的Entity
|
|
|
|
Map<String, FactArticlePublishedAgencyDailyEntity> agencyDailyEntityMap = convertAgencyDailyEntity(agencyDTOList, dimIdBean); |
|
|
|
if (!CollectionUtils.isEmpty(agencySummaryMap)){ |
|
|
|
//同一个机关下数据累加
|
|
|
|
for (Map.Entry<String, ArticleGridPublishedSummaryDTO> entry : agencySummaryMap.entrySet()) { |
|
|
|
String agencyId = entry.getKey(); |
|
|
|
ArticleGridPublishedSummaryDTO summary = entry.getValue(); |
|
|
|
FactArticlePublishedAgencyDailyEntity dimAgencyEntity = agencyDailyEntityMap.get(agencyId); |
|
|
|
if (dimAgencyEntity == null) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
dimAgencyEntity.setArticleTotalCount(dimAgencyEntity.getArticlePublishedCount()+summary.getArticleTotalCount()); |
|
|
|
dimAgencyEntity.setArticlePublishedCount(dimAgencyEntity.getPublishedCount()+summary.getArticlePublishedCount()); |
|
|
|
dimAgencyEntity.setPublishedCount(dimAgencyEntity.getPublishedCount()+summary.getPublishedCount()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//获取当天的业务数据
|
|
|
|
List<ArticleGridPublishedSummaryDTO> publishedArticleCount = articleService.getAllAgencyPublishedCount(customerId, statsDate); |
|
|
|
Map<String, FactArticlePublishedAgencyDailyEntity> haveDataAgencyDailyMap = new HashMap<>(); |
|
|
@ -495,6 +482,20 @@ public class StatsPublicityServiceImpl implements StatsPublicityService { |
|
|
|
haveDataAgencyDailySelfMap.put(selfDaily.getAgencyId(), selfDaily); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!CollectionUtils.isEmpty(agencySummaryMap)){ |
|
|
|
//同一个机关下数据累加
|
|
|
|
for (Map.Entry<String, ArticleGridPublishedSummaryDTO> entry : agencySummaryMap.entrySet()) { |
|
|
|
String agencyId = entry.getKey(); |
|
|
|
ArticleGridPublishedSummaryDTO summary = entry.getValue(); |
|
|
|
FactArticlePublishedAgencyDailyEntity dimAgencyEntity = agencyDailyEntityMap.get(agencyId); |
|
|
|
if (dimAgencyEntity == null) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
dimAgencyEntity.setArticleTotalCount(dimAgencyEntity.getArticlePublishedCount()+summary.getArticleTotalCount()); |
|
|
|
dimAgencyEntity.setArticlePublishedCount(dimAgencyEntity.getPublishedCount()+summary.getArticlePublishedCount()); |
|
|
|
dimAgencyEntity.setPublishedCount(dimAgencyEntity.getPublishedCount()+summary.getPublishedCount()); |
|
|
|
} |
|
|
|
} |
|
|
|
//数据向上级机关添加
|
|
|
|
if (!CollectionUtils.isEmpty(haveDataAgencyDailyMap)) { |
|
|
|
for (Map.Entry<String, FactArticlePublishedAgencyDailyEntity> entry : haveDataAgencyDailyMap.entrySet()) { |
|
|
|