Explorar el Código

修改抽取情况缺失

master
WendyYang hace 1 año
padre
commit
9e6e4e503b
Se han modificado 1 ficheros con 13 adiciones y 11 borrados
  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 Ver fichero

@@ -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);
});
}


Cargando…
Cancelar
Guardar