From 9e6e4e503bd9149a210e88d501ebaa5fcbd10e18 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Mon, 10 Apr 2023 09:55:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=BD=E5=8F=96=E6=83=85?= =?UTF-8?q?=E5=86=B5=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/meeting/manage/MeetingManage.java | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) 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); }); }