|
|
@@ -23,6 +23,7 @@ import com.ningdatech.pmapi.meeting.entity.dto.MeetingAndAttendStatusDTO; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.dto.MeetingBasicDTO; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.dto.RandomInviteRuleDTO; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertInviteTypeEnum; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.req.MeetingListReq; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.vo.ExpertBasicInfoVO; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.vo.MeetingByManagerVO; |
|
|
@@ -194,20 +195,28 @@ public class MeetingManageHelper { |
|
|
|
/** |
|
|
|
* 校验是否能够进行指定邀请 |
|
|
|
* |
|
|
|
* @param meetingId 会议ID |
|
|
|
* @param expertIds 专家ID |
|
|
|
* @param meetingId 会议ID |
|
|
|
* @param expertIds 专家ID |
|
|
|
* @param inviteType 邀请类型 |
|
|
|
* @return 符合邀请规则的专家 |
|
|
|
* @author WendyYang |
|
|
|
**/ |
|
|
|
public List<ExpertUserFullInfo> appointExpertCheck(Long meetingId, List<Long> expertIds) { |
|
|
|
public List<ExpertUserFullInfo> appointExpertCheck(Long meetingId, Integer inviteType, List<Long> expertIds) { |
|
|
|
List<ExpertUserFullInfo> experts = expertUserFullInfoService.listByUserId(expertIds); |
|
|
|
AvoidRuleDTO avoidRule = getAvoidInfoDto(meetingId); |
|
|
|
AvoidRuleDTO avoidRule; |
|
|
|
if (ExpertInviteTypeEnum.RANDOM.eq(inviteType)) { |
|
|
|
avoidRule = getAvoidInfoDto(meetingId); |
|
|
|
} else { |
|
|
|
avoidRule = null; |
|
|
|
} |
|
|
|
experts.forEach(expert -> { |
|
|
|
if (avoidRule.getAvoidUnitIdList().contains(expert.getCompany())) { |
|
|
|
throw BizException.wrap("请移除已回避单位的专家"); |
|
|
|
} |
|
|
|
if (CollectionUtils.isNotEmpty(avoidRule.getExpertIds()) && avoidRule.getExpertIds().contains(expert.getUserId())) { |
|
|
|
throw BizException.wrap("请移除已回避的专家"); |
|
|
|
if (avoidRule != null) { |
|
|
|
if (avoidRule.getAvoidUnitIdList().contains(expert.getCompany())) { |
|
|
|
throw BizException.wrap("请移除已回避单位的专家"); |
|
|
|
} |
|
|
|
if (CollectionUtils.isNotEmpty(avoidRule.getExpertIds()) && avoidRule.getExpertIds().contains(expert.getUserId())) { |
|
|
|
throw BizException.wrap("请移除已回避的专家"); |
|
|
|
} |
|
|
|
} |
|
|
|
// 校验专家状态 |
|
|
|
ExpertAccountStatusEnum accountStatus = ExpertAccountStatusEnum.of(expert.getExpertAccountStatus()); |
|
|
|