|
@@ -99,6 +99,8 @@ public class DataDashboardService {
|
|
|
private LongArticleCrawlerVideoRepository crawlerVideoRepository;
|
|
|
@Autowired
|
|
|
private LongArticleTitleAuditRepository longArticleTitleAuditRepository;
|
|
|
+ @Autowired
|
|
|
+ private PublishSingleVideoSourceRepository videoPoolRepository;
|
|
|
|
|
|
@ApolloJsonValue("${export.account.ghId:[]}")
|
|
|
private static List<String> ghIdList;
|
|
@@ -2015,7 +2017,8 @@ public class DataDashboardService {
|
|
|
|
|
|
List<Pair<String, String>> styles = Arrays
|
|
|
.asList(
|
|
|
- Pair.of("H", "0.00%")
|
|
|
+ Pair.of("H", "0.00%"),
|
|
|
+ Pair.of("K", "0.00%")
|
|
|
);
|
|
|
|
|
|
doSendFeishuSheet(dateStrList, dailyDetailSheetToken, "vddANt", rowNum, rows,
|
|
@@ -2045,6 +2048,10 @@ public class DataDashboardService {
|
|
|
videoAuditExport.setPoolType(key);
|
|
|
map.put(key, videoAuditExport);
|
|
|
});
|
|
|
+ List<PublishSingleVideoSource> videoPoolAuditList = videoPoolRepository.getByVideoPoolAuditTimestampBetween(
|
|
|
+ timestamp, timestamp + 86400000);
|
|
|
+ Map<Integer, List<PublishSingleVideoSource>> videoPoolAuditMap = videoPoolAuditList.stream()
|
|
|
+ .collect(Collectors.groupingBy(PublishSingleVideoSource::getFlowPoolLevel));
|
|
|
for (LongArticleTitleAudit titleAudit : auditList) {
|
|
|
ContentPoolTypeDTO poolTypeDTO = poolTypeMap.get(titleAudit.getContentId());
|
|
|
if (!map.containsKey(poolTypeDTO.getPoolType())) {
|
|
@@ -2070,7 +2077,8 @@ public class DataDashboardService {
|
|
|
for (Map.Entry<String, VideoAuditExport> entry : map.entrySet()) {
|
|
|
VideoAuditExport videoAuditExport = entry.getValue();
|
|
|
List<ContentPoolTypeDTO> watingAuditList = waitingAuditPoolTypeMap.get(videoAuditExport.getPoolType());
|
|
|
- videoAuditExport.setPoolType(ContentPoolEnum.from(videoAuditExport.getPoolType()).getDescription());
|
|
|
+ ContentPoolEnum poolEnum = ContentPoolEnum.from(videoAuditExport.getPoolType());
|
|
|
+ videoAuditExport.setPoolType(poolEnum.getDescription());
|
|
|
if (videoAuditExport.getVideoAuditCount() > 0) {
|
|
|
videoAuditExport.setArticleAuditPassRate(
|
|
|
videoAuditExport.getArticleAuditPassCount() * 1.0 / videoAuditExport.getArticleAuditCount());
|
|
@@ -2078,6 +2086,17 @@ public class DataDashboardService {
|
|
|
if (CollectionUtils.isNotEmpty(watingAuditList)) {
|
|
|
videoAuditExport.setWaitingAuditCount(watingAuditList.size());
|
|
|
}
|
|
|
+ List<PublishSingleVideoSource> videoPoolList = videoPoolAuditMap.get(poolEnum.getValue());
|
|
|
+ if (CollectionUtils.isNotEmpty(videoPoolList)) {
|
|
|
+ long videoPoolAuditCount = videoPoolAuditList.size();
|
|
|
+ long videoPoolAuditPassCount = videoPoolList.stream()
|
|
|
+ .filter(o -> o.getVideoPoolAuditStatus().equals(ProduceContentAuditStatusEnum.pass.getVal())).count();
|
|
|
+ videoAuditExport.setVideoPoolAuditCount(videoPoolAuditCount);
|
|
|
+ videoAuditExport.setVideoPoolAuditPassCount(videoPoolAuditPassCount);
|
|
|
+ if (videoPoolAuditCount > 0) {
|
|
|
+ videoAuditExport.setVideoPoolAuditPassRate(videoPoolAuditPassCount * 1.0 / videoPoolAuditCount);
|
|
|
+ }
|
|
|
+ }
|
|
|
result.add(videoAuditExport);
|
|
|
}
|
|
|
// sum
|
|
@@ -2087,6 +2106,9 @@ public class DataDashboardService {
|
|
|
long videoAuditCount = crawlerVideoList.size();
|
|
|
long videoAuditPassCount = crawlerVideoList.stream()
|
|
|
.filter(o -> o.getStatus().equals(ProduceContentAuditStatusEnum.pass.getVal())).count();
|
|
|
+ long videoPoolAuditCount = videoPoolAuditList.size();
|
|
|
+ long videoPoolAuditPassCount = videoPoolAuditList.stream()
|
|
|
+ .filter(o -> o.getVideoPoolAuditStatus().equals(ProduceContentAuditStatusEnum.pass.getVal())).count();
|
|
|
VideoAuditExport sum = new VideoAuditExport();
|
|
|
sum.setDateStr(dateStr);
|
|
|
sum.setPoolType("SUM");
|
|
@@ -2098,6 +2120,11 @@ public class DataDashboardService {
|
|
|
if (sum.getVideoAuditCount() > 0) {
|
|
|
sum.setArticleAuditPassRate(sum.getArticleAuditPassCount() * 1.0 / sum.getArticleAuditCount());
|
|
|
}
|
|
|
+ sum.setVideoPoolAuditCount(videoPoolAuditCount);
|
|
|
+ sum.setVideoPoolAuditPassCount(videoPoolAuditPassCount);
|
|
|
+ if (sum.getVideoPoolAuditCount() > 0) {
|
|
|
+ sum.setVideoPoolAuditPassRate(sum.getVideoPoolAuditPassCount() * 1.0 / sum.getVideoPoolAuditCount());
|
|
|
+ }
|
|
|
result.add(sum);
|
|
|
result.sort(Comparator.comparing(VideoAuditExport::getPoolType));
|
|
|
return result;
|
|
@@ -2149,7 +2176,8 @@ public class DataDashboardService {
|
|
|
.asList(
|
|
|
Pair.of("G", "0.00%"),
|
|
|
Pair.of("J", "0.00%"),
|
|
|
- Pair.of("M", "0.00%")
|
|
|
+ Pair.of("M", "0.00%"),
|
|
|
+ Pair.of("P", "0.00%")
|
|
|
);
|
|
|
doSendFeishuSheet(dateStrList, dailyDetailSheetToken, "qEipyL", rowNum, rows,
|
|
|
2, styles, null);
|
|
@@ -2193,6 +2221,8 @@ public class DataDashboardService {
|
|
|
Long videoAuditPassCount = longArticleTitleAuditRepository.countByStatusAndAuditTimestampBetween(
|
|
|
1, start, end);
|
|
|
Long videoAuditCount = longArticleTitleAuditRepository.countByAuditTimestampBetween(start, end);
|
|
|
+ List<PublishSingleVideoSource> videoPoolAuditList = videoPoolRepository.getByVideoPoolAuditTimestampBetween(
|
|
|
+ start, end);
|
|
|
|
|
|
result.setDateStr(dateStr);
|
|
|
result.setPlanCrawlerCount(planCrawlerCount);
|
|
@@ -2213,6 +2243,13 @@ public class DataDashboardService {
|
|
|
if (videoAuditCount > 0) {
|
|
|
result.setVideoAuditPassRate(videoAuditPassCount * 1.0 / videoAuditCount);
|
|
|
}
|
|
|
+ result.setVideoPoolAuditCount((long) videoPoolAuditList.size());
|
|
|
+ long videoPoolAuditPassCount = videoPoolAuditList.stream()
|
|
|
+ .filter(o -> o.getVideoPoolAuditStatus().equals(ProduceContentAuditStatusEnum.pass.getVal())).count();
|
|
|
+ result.setVideoPoolAuditPassCount(videoPoolAuditPassCount);
|
|
|
+ if (result.getVideoPoolAuditCount() > 0) {
|
|
|
+ result.setVideoPoolAuditPassRate(videoPoolAuditPassCount * 1.0 / result.getVideoPoolAuditCount());
|
|
|
+ }
|
|
|
return result;
|
|
|
}
|
|
|
|