|
|
@@ -290,6 +290,7 @@ public class ExpertInviteManage { |
|
|
|
* @param avoidRule 回避信息 |
|
|
|
* @param randomRule 抽取规则 |
|
|
|
* @param invitedExpertIds 指定抽取专家ID |
|
|
|
* @param meetingCreateOn 会议创建时间 |
|
|
|
* @return 满足抽取条件的专家 |
|
|
|
* @author WendyYang |
|
|
|
**/ |
|
|
@@ -297,7 +298,8 @@ public class ExpertInviteManage { |
|
|
|
RandomInviteRuleDTO randomRule, |
|
|
|
List<Long> invitedExpertIds, |
|
|
|
LocalDateTime sTime, |
|
|
|
LocalDateTime eTime) { |
|
|
|
LocalDateTime eTime, |
|
|
|
LocalDateTime meetingCreateOn) { |
|
|
|
ExpertChooseDTO result = new ExpertChooseDTO(new ArrayList<>(), 0); |
|
|
|
MergeExpertIdDTO merge = mergeExpertIdsByCondition(randomRule, avoidRule); |
|
|
|
if (merge.getSkip()) { |
|
|
@@ -328,7 +330,7 @@ public class ExpertInviteManage { |
|
|
|
// 处理回避专家次数 |
|
|
|
if (avoidRule.getWeekInviteCount() != null) { |
|
|
|
Integer weekInviteCount = avoidRule.getWeekInviteCount(); |
|
|
|
List<Long> tmpExpertIdsNotIn = listAgreedUserIdByRecentMeetings(weekInviteCount, recentDays, sTime); |
|
|
|
List<Long> tmpExpertIdsNotIn = listAgreedUserIdByRecentMeetings(weekInviteCount, recentDays, meetingCreateOn); |
|
|
|
expertIdsNotIn.addAll(tmpExpertIdsNotIn); |
|
|
|
} |
|
|
|
// 处理专家层级 |
|
|
@@ -557,8 +559,9 @@ public class ExpertInviteManage { |
|
|
|
List<Long> chooseExpertIds = new ArrayList<>(); |
|
|
|
LocalDateTime sTime = meeting.getStartTime(); |
|
|
|
LocalDateTime eTime = meeting.getEndTime(); |
|
|
|
LocalDateTime createOn = meeting.getCreateOn(); |
|
|
|
randomRules.forEach(rule -> { |
|
|
|
ExpertChooseDTO tmpExperts = expertInviteByRandomRule(avoidRule, rule, chooseExpertIds, sTime, eTime); |
|
|
|
ExpertChooseDTO tmpExperts = expertInviteByRandomRule(avoidRule, rule, chooseExpertIds, sTime, eTime, createOn); |
|
|
|
if (tmpExperts.getTotal() < rule.getCount()) { |
|
|
|
throw BizException.wrap("可抽取专家数量不足"); |
|
|
|
} |
|
|
|