diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java index a752660..4823bec 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java @@ -475,18 +475,20 @@ public class MeetingManage { if (isRandom) { result.setInviteStatistics(new ArrayList<>()); Map> groupByRule = CollUtils.group(experts, MeetingExpert::getRuleId); - List inviteRules = inviteRuleService.listByIds(groupByRule.keySet()); + List inviteRules = inviteRuleService.listByMeetingId(meetingId); Map 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 expertList = groupByRule.get(k); + if (expertList != null) { + expertList.forEach((expert) -> { + if (AGREED.eq(expert.getStatus())) { + statistics.incrAgreeCnt(); + } + statistics.incrNoticedCnt(); + }); + } result.getInviteStatistics().add(statistics); }); }