Browse Source

修改抽取情况缺失

master
WendyYang 1 year ago
parent
commit
9e6e4e503b
1 changed files with 13 additions and 11 deletions
  1. +13
    -11
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java

+ 13
- 11
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java View File

@@ -475,18 +475,20 @@ public class MeetingManage {
if (isRandom) { if (isRandom) {
result.setInviteStatistics(new ArrayList<>()); result.setInviteStatistics(new ArrayList<>());
Map<Long, List<MeetingExpert>> groupByRule = CollUtils.group(experts, MeetingExpert::getRuleId); Map<Long, List<MeetingExpert>> groupByRule = CollUtils.group(experts, MeetingExpert::getRuleId);
List<ExpertInviteRule> inviteRules = inviteRuleService.listByIds(groupByRule.keySet());
List<ExpertInviteRule> inviteRules = inviteRuleService.listByMeetingId(meetingId);
Map<Long, ExpertInviteRule> ruleMap = CollUtils.listToMap(inviteRules, ExpertInviteRule::getId); Map<Long, ExpertInviteRule> ruleMap = CollUtils.listToMap(inviteRules, ExpertInviteRule::getId);
groupByRule.forEach((ruleId, expertList) -> {
InviteStatisticsByRuleVO statistics = InviteStatisticsByRuleVO.init(ruleId);
expertList.forEach((expert) -> {
Integer status = expert.getStatus();
if (AGREED.eq(status)) {
statistics.incrAgreeCnt();
}
statistics.setInviteCnt(ruleMap.get(ruleId).getInviteCount());
statistics.incrNoticedCnt();
});
ruleMap.forEach((k, v) -> {
InviteStatisticsByRuleVO statistics = InviteStatisticsByRuleVO.init(k);
statistics.setInviteCnt(v.getInviteCount());
List<MeetingExpert> expertList = groupByRule.get(k);
if (expertList != null) {
expertList.forEach((expert) -> {
if (AGREED.eq(expert.getStatus())) {
statistics.incrAgreeCnt();
}
statistics.incrNoticedCnt();
});
}
result.getInviteStatistics().add(statistics); result.getInviteStatistics().add(statistics);
}); });
} }


Loading…
Cancel
Save