|
@@ -1,15 +1,18 @@
|
|
|
package com.ruoyi.web.controller.invest;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.ruoyi.common.config.RuoYiConfig;
|
|
|
+import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
import com.ruoyi.common.enums.FileType;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
|
|
import com.ruoyi.common.utils.file.FileUtils;
|
|
|
+import com.ruoyi.common.utils.sms.SmsSenderUtils;
|
|
|
import com.ruoyi.common.utils.uuid.IdUtils;
|
|
|
import com.ruoyi.framework.config.ServerConfig;
|
|
|
import com.ruoyi.invest.domain.TProjectCirculation;
|
|
@@ -17,6 +20,7 @@ import com.ruoyi.invest.domain.TProjectMeeting;
|
|
|
import com.ruoyi.invest.service.ITProjectCirculationService;
|
|
|
import com.ruoyi.invest.service.ITProjectMeetingService;
|
|
|
import com.ruoyi.system.service.ISysDictDataService;
|
|
|
+import com.ruoyi.system.service.ISysUserService;
|
|
|
import com.ruoyi.tool.domain.TUnifyFile;
|
|
|
import com.ruoyi.tool.service.ITUnifyFileService;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -62,6 +66,10 @@ public class TProjectMeetingController extends BaseController
|
|
|
@Autowired
|
|
|
private ISysDictDataService dictDataService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysUserService sysUserService;
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 查询会议记录列表
|
|
|
*/
|
|
@@ -146,6 +154,37 @@ public class TProjectMeetingController extends BaseController
|
|
|
tProjectCirculation.setCreateBy(getNickName());
|
|
|
tProjectCirculationService.insertTProjectCirculation(tProjectCirculation);
|
|
|
|
|
|
+ // todo 发送短信-参与人-发起人
|
|
|
+ if(tProjectMeeting.getMeetingType().equals("LX") || tProjectMeeting.getMeetingType().equals("TJ")){
|
|
|
+ // todo 参与人
|
|
|
+ if(StringUtils.isNotEmpty(tProjectMeeting.getParticipantsId())){
|
|
|
+ StringUtils.str2List(tProjectMeeting.getParticipantsId(),",",true,true).stream().forEach(str -> {
|
|
|
+ SysUser user = sysUserService.selectUserById(Long.valueOf(str));
|
|
|
+ String contents = "您好," + user.getNickName() + ",兹定于 " +
|
|
|
+ tProjectMeeting.getStartTime() + "时间 至 " + tProjectMeeting.getEndTime() +
|
|
|
+ "时间 在" + tProjectMeeting.getPlace() + "会议室召开" + tProjectMeeting.getMeetingTheme() + "会议,请提前做好准备按时参加。";
|
|
|
+ try {
|
|
|
+ SmsSenderUtils.sendSms(user.getPhonenumber(),contents);
|
|
|
+ } catch (IOException e) {
|
|
|
+ logger.error("短信发送失败"+e.getMessage());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // todo 发起人
|
|
|
+ if(StringUtils.isNotEmpty(tProjectMeeting.getPromoterId())){
|
|
|
+ SysUser user = sysUserService.selectUserById(Long.valueOf(tProjectMeeting.getPromoterId()));
|
|
|
+ String contents = "您好," + user.getNickName() + ",兹定于 " +
|
|
|
+ tProjectMeeting.getStartTime() + "时间 至 " + tProjectMeeting.getEndTime() +
|
|
|
+ "时间 在" + tProjectMeeting.getPlace() + "会议室召开" + tProjectMeeting.getMeetingTheme() + "会议,请提前做好准备按时参加。";
|
|
|
+ try {
|
|
|
+ SmsSenderUtils.sendSms(user.getPhonenumber(),contents);
|
|
|
+ } catch (IOException e) {
|
|
|
+ logger.error("短信发送失败"+e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return toAjax(tProjectMeetingService.insertTProjectMeeting(tProjectMeeting));
|
|
|
}
|
|
|
|