瀏覽代碼

增加会议取消短信通知

tags/24080901
WendyYang 1 年之前
父節點
當前提交
83707317ab
共有 3 個文件被更改,包括 24 次插入8 次删除
  1. +5
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/constant/MeetingMsgTemplateConst.java
  2. +18
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingMsgHelper.java
  3. +1
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java

+ 5
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/constant/MeetingMsgTemplateConst.java 查看文件

@@ -16,9 +16,13 @@ public interface MeetingMsgTemplateConst {
String INVITE_END = "注意,%s会议自动抽取已结束,请及时确认是否召开会议";

/**
* 尊敬的【姓名】专家您好,您于【确认时间】接受了信息化项目评审会议邀请,会议时间:【会议时间】,会议地点:【会议地点】。请准时参加评审会议。如有疑问请联系【联系人】(【联系方式】)。
* 确认名单:尊敬的【姓名】专家您好,您于【确认时间】接受了信息化项目评审会议邀请,会议时间:【会议时间】,会议地点:【会议地点】。请准时参加评审会议。如有疑问请联系【联系人】(【联系方式】)。
*/
String CONFIRMED_ROSTER = "尊敬的%s专家您好,您于%s接受了信息化项目评审会议邀请,会议时间:%s,会议地点:%s。请准时参加评审会议。如有疑问请联系%s(%s)。";

/**
* 会议取消:尊敬的{name}专家,因会议取消说明,原定于开会时间的会议类型会议已取消。给您带来不便,敬请谅解。如有疑问请咨询会议联系人「会议联系人联系方式」。
*/
String MEETING_CANCEL = "尊敬的%s专家,原定于%s的%s会议已取消。给您带来不便,敬请谅解。如有疑问请咨询会议联系人「%s」。";

}

+ 18
- 2
pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingMsgHelper.java 查看文件

@@ -8,6 +8,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.MeetingReviewTypeEnum;
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo;
import com.ningdatech.pmapi.organization.model.entity.DingOrganization;
import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService;
@@ -29,6 +30,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
* <p>
@@ -103,7 +105,7 @@ public class MeetingMsgHelper {
WorkNoticeInfo swn = getSendWorkNoticeInfo(info.getAccountId());
swn.setMsg(msgContent);
workNoticeStagingService.addByWorkNotice(swn, MsgTypeEnum.REVIEW_MEETING);
Map<String, Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<>(2);
map.put("meetingId", meetingId);
Notify notify = getNotify(userId, msgContent, MsgTypeEnum.REVIEW_MEETING, map);
notifyService.save(notify);
@@ -136,7 +138,7 @@ public class MeetingMsgHelper {
WorkNoticeInfo swn = getSendWorkNoticeInfo(info.getAccountId());
swn.setMsg(msgContent);
workingNotices.add(swn);
Map<String, Object> map = new HashMap<>();
Map<String, Object> map = new HashMap<>(2);
map.put("meetingId", meeting.getId());
Notify notify = getNotify(info.getId(), msgContent, MsgTypeEnum.EXPERT_REVIEW, map);
notifies.add(notify);
@@ -148,4 +150,18 @@ public class MeetingMsgHelper {
}


public void sendCancelMeetingMsg(List<MeetingExpert> experts, Meeting meeting) {
String startTime = officialTime(meeting.getStartTime());
String meetingType = MeetingReviewTypeEnum.getValue(meeting.getType());
List<SendSmsContext> contexts = experts.stream().map(w -> {
String content = String.format(MeetingMsgTemplateConst.MEETING_CANCEL,
w.getExpertName(), startTime, meetingType, meeting.getContact());
SendSmsContext context = new SendSmsContext();
context.setReceiveNumber(w.getMobile());
context.setContent(content);
return context;
}).collect(Collectors.toList());
yxtCallOrSmsHelper.sendSms(contexts);
}

}

+ 1
- 5
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java 查看文件

@@ -664,11 +664,7 @@ public class MeetingManage {
// 发送通知给专家
List<MeetingExpert> experts = meetingExpertService.listAgreedExperts(meetingId);
if (!experts.isEmpty()) {
// TODO 取消会议后发送短信通知
// meeting.setCancelRemark(po.getCancelRemark());
// String meetingType = dictionaryCache.getByCode(meeting.getType()).getName();
// List<SendSmsContext> contexts = YxtSmsContextBuilder.smsToExpertByCancelMeeting(meeting, experts, meetingType);
// yxtCallOrSmsHelper.sendSms(contexts);
meetingMsgHelper.sendCancelMeetingMsg(experts, meeting);
}
} finally {
distributedLock.releaseLock(key);


Loading…
取消
儲存