|
|
@@ -7,6 +7,7 @@ import com.ningdatech.basic.util.CollUtils; |
|
|
|
import com.ningdatech.pmapi.meeting.constant.MeetingMsgTemplateConst; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.domain.Meeting; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertInviteTypeEnum; |
|
|
|
import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingReviewTypeEnum; |
|
|
|
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo; |
|
|
|
import com.ningdatech.pmapi.organization.model.entity.DingOrganization; |
|
|
@@ -187,4 +188,29 @@ public class MeetingCallOrMsgHelper { |
|
|
|
experts.forEach(w -> w.setSubmitKey(submitKey)); |
|
|
|
} |
|
|
|
|
|
|
|
public void sendExpertLeaveMsg(MeetingExpert expert, Meeting meeting) { |
|
|
|
Long userId = meeting.getCreateBy(); |
|
|
|
String msgContent; |
|
|
|
if (ExpertInviteTypeEnum.RANDOM.eq(meeting.getInviteType())) { |
|
|
|
msgContent = String.format(MeetingMsgTemplateConst.EXPERT_LEAVE_RANDOM, meeting.getName()); |
|
|
|
} else { |
|
|
|
msgContent = String.format(MeetingMsgTemplateConst.EXPERT_LEAVE_APPOINT, meeting.getName(), expert.getExpertName()); |
|
|
|
} |
|
|
|
UserInfo info = userInfoService.getById(userId); |
|
|
|
SendSmsContext yxtContent = new SendSmsContext(); |
|
|
|
yxtContent.setContent(msgContent); |
|
|
|
yxtContent.setReceiveNumber(info.getMobile()); |
|
|
|
yxtCallOrSmsHelper.sendSms(yxtContent); |
|
|
|
// 发送工作通知 |
|
|
|
if (info.getAccountId() != null) { |
|
|
|
WorkNoticeInfo swn = getSendWorkNoticeInfo(info.getAccountId()); |
|
|
|
swn.setMsg(msgContent); |
|
|
|
workNoticeStagingService.addByWorkNotice(swn, MsgTypeEnum.REVIEW_MEETING); |
|
|
|
Map<String, Object> map = new HashMap<>(2); |
|
|
|
map.put("meetingId", meeting.getId()); |
|
|
|
Notify notify = getNotify(userId, msgContent, MsgTypeEnum.REVIEW_MEETING, map); |
|
|
|
notifyService.save(notify); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |