|
|
@@ -337,6 +337,7 @@ public class ExpertInviteManage { |
|
|
|
* @param count 抽取数量 |
|
|
|
* @param msTime 会议开始时间 |
|
|
|
* @param meTime 会议结束时间 |
|
|
|
* @param reInvite 邀请已拒绝 |
|
|
|
* @return {@link ExpertChooseDTO} |
|
|
|
* @author WendyYang |
|
|
|
**/ |
|
|
@@ -347,7 +348,7 @@ public class ExpertInviteManage { |
|
|
|
LocalDateTime msTime, |
|
|
|
LocalDateTime meTime, |
|
|
|
LocalDateTime tsTime, |
|
|
|
boolean invitedRefused) { |
|
|
|
boolean reInvite) { |
|
|
|
ExpertChooseDTO result = new ExpertChooseDTO(new ArrayList<>(), 0); |
|
|
|
// 合并标签、字典 |
|
|
|
MergeExpertIdDTO merge = mergeExpertIdsByCondition(randomRule, avoidRule); |
|
|
@@ -402,17 +403,21 @@ public class ExpertInviteManage { |
|
|
|
List<String> tmpUniqCompanyCodes = CollUtils.fieldList(agreeOrNoticingUserInfos, ExpertUserFullInfo::getCompanyUniqCode); |
|
|
|
notInCompanyUniqCodeList.addAll(tmpUniqCompanyCodes); |
|
|
|
} |
|
|
|
if (!invitedRefused) { |
|
|
|
// 拒绝参加的不可以被再次抽中 |
|
|
|
List<MeetingExpert> refusedExperts = expertGroupByStatus.get(REFUSED); |
|
|
|
if (refusedExperts.size() > 0) { |
|
|
|
List<Long> refusedExpertIds = refusedExperts.stream() |
|
|
|
.filter(w -> w.getCreateOn().isBefore(tsTime)) |
|
|
|
|
|
|
|
// 处理已拒绝专家与重复抽取 |
|
|
|
BizUtils.notEmpty(expertGroupByStatus.get(REFUSED), refuseExperts -> { |
|
|
|
List<Long> tmpExpertIdsNotIn; |
|
|
|
if (reInvite) { |
|
|
|
tmpExpertIdsNotIn = refuseExperts.stream() |
|
|
|
.filter(w -> w.getCreateOn().isAfter(tsTime)) |
|
|
|
.map(MeetingExpert::getExpertId) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
expertIdsNotIn.addAll(refusedExpertIds); |
|
|
|
} else { |
|
|
|
tmpExpertIdsNotIn = CollUtils.fieldList(refuseExperts, MeetingExpert::getExpertId); |
|
|
|
} |
|
|
|
} |
|
|
|
expertIdsNotIn.addAll(tmpExpertIdsNotIn); |
|
|
|
}); |
|
|
|
|
|
|
|
boolean hasExpertIdIn = !expertIdsIn.isEmpty(); |
|
|
|
boolean hasExpertIdNotIn = !expertIdsNotIn.isEmpty(); |
|
|
|
if (hasExpertIdIn && hasExpertIdNotIn) { |
|
|
|