|
@@ -15,7 +15,6 @@ import com.hz.pm.api.organization.model.entity.DingOrganization; |
|
|
import com.hz.pm.api.organization.service.IDingEmployeeInfoService; |
|
|
import com.hz.pm.api.organization.service.IDingEmployeeInfoService; |
|
|
import com.hz.pm.api.organization.service.IDingOrganizationService; |
|
|
import com.hz.pm.api.organization.service.IDingOrganizationService; |
|
|
import com.hz.pm.api.sms.constant.VoiceSmsTemplateConst; |
|
|
import com.hz.pm.api.sms.constant.VoiceSmsTemplateConst; |
|
|
import com.hz.pm.api.sms.utils.DateUtil; |
|
|
|
|
|
import com.hz.pm.api.staging.enums.MsgTypeEnum; |
|
|
import com.hz.pm.api.staging.enums.MsgTypeEnum; |
|
|
import com.hz.pm.api.staging.service.INdWorkNoticeStagingService; |
|
|
import com.hz.pm.api.staging.service.INdWorkNoticeStagingService; |
|
|
import com.hz.pm.api.sys.model.entity.Notify; |
|
|
import com.hz.pm.api.sys.model.entity.Notify; |
|
@@ -30,6 +29,7 @@ import org.springframework.stereotype.Component; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
import java.time.LocalDateTime; |
|
|
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@@ -51,8 +51,10 @@ public class MeetingNotifyHelper { |
|
|
private final IDingOrganizationService dingOrganizationService; |
|
|
private final IDingOrganizationService dingOrganizationService; |
|
|
private final INotifyService notifyService; |
|
|
private final INotifyService notifyService; |
|
|
|
|
|
|
|
|
|
|
|
private static final DateTimeFormatter MEETING_TIME_DTF = DateTimeFormatter.ofPattern("yyyy年M月d日 HH:mm"); |
|
|
|
|
|
|
|
|
private static String officialTime(LocalDateTime time) { |
|
|
private static String officialTime(LocalDateTime time) { |
|
|
return time.format(DateUtil.DTF_YMD_HM); |
|
|
|
|
|
|
|
|
return time.format(MEETING_TIME_DTF); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private Notify getNotify(Long userId, String msg, MsgTypeEnum type, Map<String, Object> extraPara) { |
|
|
private Notify getNotify(Long userId, String msg, MsgTypeEnum type, Map<String, Object> extraPara) { |
|
@@ -160,7 +162,7 @@ public class MeetingNotifyHelper { |
|
|
* @author WendyYang |
|
|
* @author WendyYang |
|
|
**/ |
|
|
**/ |
|
|
private void callExperts(Meeting meeting, List<MeetingExpert> experts) { |
|
|
private void callExperts(Meeting meeting, List<MeetingExpert> experts) { |
|
|
String content = String.format(VoiceSmsTemplateConst.EXPERT_INVITE, |
|
|
|
|
|
|
|
|
String content = String.format(VoiceSmsTemplateConst.EXPERT_INVITE_CALL, |
|
|
meeting.getHoldOrg(), meeting.getName(), officialTime(meeting.getStartTime()), |
|
|
meeting.getHoldOrg(), meeting.getName(), officialTime(meeting.getStartTime()), |
|
|
meeting.getMeetingAddress()); |
|
|
meeting.getMeetingAddress()); |
|
|
Set<String> phones = CollUtils.fieldSet(experts, MeetingExpert::getMobile); |
|
|
Set<String> phones = CollUtils.fieldSet(experts, MeetingExpert::getMobile); |
|
@@ -175,7 +177,7 @@ public class MeetingNotifyHelper { |
|
|
* @param meeting 会议 |
|
|
* @param meeting 会议 |
|
|
*/ |
|
|
*/ |
|
|
private void smsExperts(Meeting meeting, List<MeetingExpert> experts) { |
|
|
private void smsExperts(Meeting meeting, List<MeetingExpert> experts) { |
|
|
String content = String.format(VoiceSmsTemplateConst.EXPERT_INVITE, |
|
|
|
|
|
|
|
|
String content = String.format(VoiceSmsTemplateConst.EXPERT_INVITE_SMS, |
|
|
meeting.getHoldOrg(), meeting.getName(), officialTime(meeting.getStartTime()), |
|
|
meeting.getHoldOrg(), meeting.getName(), officialTime(meeting.getStartTime()), |
|
|
meeting.getMeetingAddress()); |
|
|
meeting.getMeetingAddress()); |
|
|
Set<String> phones = CollUtils.fieldSet(experts, MeetingExpert::getMobile); |
|
|
Set<String> phones = CollUtils.fieldSet(experts, MeetingExpert::getMobile); |
|
|