提交 6bbd5676 作者: 张开石

1、修改统计会议纪要推送数据接口

父级 f5e8639b
...@@ -441,7 +441,7 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti ...@@ -441,7 +441,7 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
} }
List<MeetingInfo> meetingInfoList = meetingInfoMapper.selectList(new LambdaQueryWrapper<MeetingInfo>() List<MeetingInfo> meetingInfoList = meetingInfoMapper.selectList(new LambdaQueryWrapper<MeetingInfo>()
.eq(MeetingInfo::getEmailPushAccess, true) // .eq(MeetingInfo::getEmailPushAccess, true)
.between(MeetingInfo::getStartTime, startTime, endTime)); .between(MeetingInfo::getStartTime, startTime, endTime));
Map<String, List<MeetingInfo>> hostUidMeetingInfoMap = meetingInfoList.stream().collect(Collectors.groupingBy(MeetingInfo::getHostUid)); Map<String, List<MeetingInfo>> hostUidMeetingInfoMap = meetingInfoList.stream().collect(Collectors.groupingBy(MeetingInfo::getHostUid));
Map<String, String> hostMap = new HashMap<>(); Map<String, String> hostMap = new HashMap<>();
...@@ -451,6 +451,10 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti ...@@ -451,6 +451,10 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
} }
}); });
// 总计
Map<String, Object> totalMap = new LinkedHashMap<>();
totalMap.put("host", "总计");
List<Map<String, Object>> mapList = new ArrayList<>(); List<Map<String, Object>> mapList = new ArrayList<>();
for (Map.Entry<String, List<MeetingInfo>> entry : hostUidMeetingInfoMap.entrySet()) { for (Map.Entry<String, List<MeetingInfo>> entry : hostUidMeetingInfoMap.entrySet()) {
// 使用linkedHashMap,保证输出到excel中的顺序 // 使用linkedHashMap,保证输出到excel中的顺序
...@@ -477,13 +481,15 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti ...@@ -477,13 +481,15 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
if (meetingInfo.getIsGenerated() || meetingInfo.getStatus() == MeetingState.NOTE_GENERATED.getCode()) { if (meetingInfo.getIsGenerated() || meetingInfo.getStatus() == MeetingState.NOTE_GENERATED.getCode()) {
noteGeneratedNum++; noteGeneratedNum++;
} }
if (meetingInfo.getEmailPushAccess()) { // 有转录文件 且 email_push_access为true,
if (meetingInfo.getStatus() != MeetingState.EMPTY.getCode() && meetingInfo.getEmailPushAccess()) {
emailPushAccessNum++; emailPushAccessNum++;
} }
} }
Integer avaliableNum = totalNum - emptyNum;
map.put("host", host); map.put("host", host);
map.put("totalNum", totalNum); map.put("totalNum", totalNum);
map.put("avaliableNum", totalNum - emptyNum); map.put("avaliableNum", avaliableNum);
map.put("emptyNum", emptyNum); map.put("emptyNum", emptyNum);
map.put("emailPushAccessNum", emailPushAccessNum); map.put("emailPushAccessNum", emailPushAccessNum);
map.put("newNum", newNum); map.put("newNum", newNum);
...@@ -492,7 +498,19 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti ...@@ -492,7 +498,19 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
map.put("pushErrorNum", pushErrorNum); map.put("pushErrorNum", pushErrorNum);
map.put("pushSuccessNum", pushSuccessNum); map.put("pushSuccessNum", pushSuccessNum);
mapList.add(map); mapList.add(map);
}
// 计算总计
totalMap.put("totalNum", Integer.valueOf(totalMap.getOrDefault("totalNum", 0).toString()) + totalNum);
totalMap.put("avaliableNum", Integer.valueOf(totalMap.getOrDefault("avaliableNum", 0).toString()) + avaliableNum);
totalMap.put("emptyNum", Integer.valueOf(totalMap.getOrDefault("emptyNum", 0).toString()) + emptyNum);
totalMap.put("emailPushAccessNum", Integer.valueOf(totalMap.getOrDefault("emailPushAccessNum", 0).toString()) + emailPushAccessNum);
totalMap.put("newNum", Integer.valueOf(totalMap.getOrDefault("newNum", 0).toString()) + newNum);
totalMap.put("generatErrorNum", Integer.valueOf(totalMap.getOrDefault("generatErrorNum", 0).toString()) + generatErrorNum);
totalMap.put("noteGeneratedNum", Integer.valueOf(totalMap.getOrDefault("noteGeneratedNum", 0).toString()) + noteGeneratedNum);
totalMap.put("pushErrorNum", Integer.valueOf(totalMap.getOrDefault("pushErrorNum", 0).toString()) + pushErrorNum);
totalMap.put("pushSuccessNum", Integer.valueOf(totalMap.getOrDefault("pushSuccessNum", 0).toString()) + pushSuccessNum);
}
mapList.add(totalMap);
// 导出 // 导出
OutputStream outputStream = null; OutputStream outputStream = null;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论