|
|
@@ -21,8 +21,8 @@ import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.dto.*; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.enumeration.AvoidTypeEnum; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingStatusEnum; |
|
|
|
import com.ningdatech.pmapi.meeting.helper.ExpertInviteHelper; |
|
|
|
import com.ningdatech.pmapi.meeting.helper.ExpertRandomInviteAlgorithm; |
|
|
|
import com.ningdatech.pmapi.meeting.helper.MeetingCallOrMsgHelper; |
|
|
|
import com.ningdatech.pmapi.meeting.service.IExpertInviteRuleService; |
|
|
|
import com.ningdatech.pmapi.meeting.service.IMeetingExpertService; |
|
|
@@ -377,7 +377,7 @@ public class ExpertInviteManage { |
|
|
|
break; |
|
|
|
case CURR_UNIT: |
|
|
|
Map<String, List<ExpertUserFullInfo>> unitGroup = CollUtils.group(userInfoList, ExpertUserFullInfo::getCompanyUniqCode); |
|
|
|
result.setExperts(inviteGroupByCompany(unitGroup, expertsByRecentMeeting(), randomRule.getCount())); |
|
|
|
result.setExperts(inviteGroupByUnit(unitGroup, expertsByRecentMeeting(), randomRule.getCount())); |
|
|
|
result.setTotal(unitGroup.size()); |
|
|
|
break; |
|
|
|
case CURR_STRIP: |
|
|
@@ -515,13 +515,15 @@ public class ExpertInviteManage { |
|
|
|
} |
|
|
|
Map<String, List<ExpertUserFullInfo>> userGroupByUnit = CollUtils.group(userFullInfos, ExpertUserFullInfo::getCompanyUniqCode); |
|
|
|
result.setTotal(userGroupByUnit.size()); |
|
|
|
result.setExperts(inviteGroupByCompany(userGroupByUnit, expertsByRecentMeeting(), count)); |
|
|
|
result.setExperts(inviteGroupByUnit(userGroupByUnit, expertsByRecentMeeting(), count)); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
private List<List<MeetingExpert>> expertsByRecentMeeting() { |
|
|
|
LambdaQueryWrapper<Meeting> query = Wrappers.lambdaQuery(Meeting.class) |
|
|
|
.select(Meeting::getId) |
|
|
|
.eq(Meeting::getInviteStatus, Boolean.TRUE) |
|
|
|
.ne(Meeting::getStatus, MeetingStatusEnum.CANCELED.getCode()) |
|
|
|
.orderByDesc(Meeting::getCreateOn) |
|
|
|
.last("limit " + recentMeetingCount); |
|
|
|
List<Long> meetingIds = CollUtils.fieldList(meetingService.list(query), Meeting::getId); |
|
|
|