|
|
@@ -475,18 +475,20 @@ public class MeetingManage { |
|
|
|
if (isRandom) { |
|
|
|
result.setInviteStatistics(new ArrayList<>()); |
|
|
|
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); |
|
|
|
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); |
|
|
|
}); |
|
|
|
} |
|
|
|