|
@@ -0,0 +1,41 @@
|
|
|
+package com.rongwei.sfcommon.sys.service.impl;
|
|
|
+
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
+import cn.hutool.core.util.ArrayUtil;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.rongwe.scentity.domian.AspSafetyMeeting;
|
|
|
+import com.rongwei.safecommon.utils.CXCommonUtils;
|
|
|
+import com.rongwei.sfcommon.sys.dao.AspSafetyMeetingDao;
|
|
|
+import com.rongwei.sfcommon.sys.service.AspSafetyMeetingService;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.sql.Array;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Service
|
|
|
+public class AspSafetyMeetingImpl extends ServiceImpl<AspSafetyMeetingDao, AspSafetyMeeting> implements AspSafetyMeetingService {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void reportMessage() {
|
|
|
+ //查询今天和明天需要提醒的会议
|
|
|
+ List<AspSafetyMeeting> list = this.baseMapper.selectNeedReportMessage();
|
|
|
+
|
|
|
+ //遍历list处理发送消息
|
|
|
+ list.forEach(item -> {
|
|
|
+ //处理需要接收消息的人
|
|
|
+ List<String> userIdList = Arrays.asList(item.getMeetingparticipationid().split(","));
|
|
|
+ //发送消息
|
|
|
+ CXCommonUtils.sendNotify("会议提醒",
|
|
|
+ "由【" + item.getMeetingheader() + "】主持的【"
|
|
|
+ + item.getMeetingtitle() + "】,将于【"
|
|
|
+ + DateUtil.format(item.getMeetingdate(), "yyyy-MM-dd HH:mm:ss") + "】在【"
|
|
|
+ + item.getMeetingaddress() + "】召开会议、会议说明:【"
|
|
|
+ + item.getMeetingremark() + "】,请届时参加!",
|
|
|
+ null,
|
|
|
+ userIdList,
|
|
|
+ item.getId(),
|
|
|
+ "safetymeeting");
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|