|
@@ -9,7 +9,11 @@ import com.github.stuxuhai.jpinyin.PinyinException;
|
|
|
import com.github.stuxuhai.jpinyin.PinyinFormat;
|
|
|
import com.github.stuxuhai.jpinyin.PinyinHelper;
|
|
|
import com.ruoyi.common.sendEmail.IMailService;
|
|
|
+import com.ruoyi.common.thread.Trainning.MeetingInvitationMailThread;
|
|
|
+import com.ruoyi.common.thread.Trainning.MonthlyFeedbackMailThread;
|
|
|
+import com.ruoyi.project.system.domain.SysMessage;
|
|
|
import com.ruoyi.project.system.domain.SysUser;
|
|
|
+import com.ruoyi.project.system.service.ISysMessageService;
|
|
|
import com.ruoyi.project.system.service.ISysUserService;
|
|
|
import com.ruoyi.project.training.spec.domain.*;
|
|
|
import com.ruoyi.project.training.spec.domain.vo.TStFeedbackSeasonalVO;
|
|
@@ -47,6 +51,9 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
|
|
@EnableScheduling
|
|
|
public class TStFeedbackController extends BaseController
|
|
|
{
|
|
|
+ @Autowired
|
|
|
+ private ISysMessageService sysMessageService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ITStFeedbackService tStFeedbackService;
|
|
|
|
|
@@ -531,9 +538,16 @@ public class TStFeedbackController extends BaseController
|
|
|
String mentorNameEN = PinyinHelper.convertToPinyinString(mentorName, " ", PinyinFormat.WITHOUT_TONE);
|
|
|
Date meetingDate = tStFeedbackService.selectTStFeedbackById(tStFeedback.getParentId()).getMeetingDate();
|
|
|
String meetingDateString = "20" + (meetingDate.getYear() + "年" + (meetingDate.getMonth() + 1 + "月") + meetingDate.getDate() + "日").substring(1);
|
|
|
+ // 系统通知
|
|
|
+ SysMessage message = new SysMessage();
|
|
|
+ message.setUserId(mentor.getUserId());
|
|
|
+ message.setMsgTitle("您有一条系统消息");
|
|
|
+ message.setMsgContent("您有一条季度汇报消息待查看");
|
|
|
// TODO: 部署前开启
|
|
|
// 邮件通知导师
|
|
|
-// MeetingInvitationMailThread meetingInvitationMailThread = new MeetingInvitationMailThread(mailService, email, successorName, successorNameEN, mentorName, mentorNameEN, feedbackYear, feedbackSeason, meetingDateString);
|
|
|
+// MeetingInvitationMailThread meetingInvitationMailThread = new MeetingInvitationMailThread(
|
|
|
+// mailService, email, successorName, successorNameEN, mentorName, mentorNameEN,
|
|
|
+// feedbackYear, feedbackSeason, meetingDateString, sysMessageService, message);
|
|
|
// Thread thread = new Thread(meetingInvitationMailThread);
|
|
|
// thread.start();
|
|
|
}
|
|
@@ -550,7 +564,7 @@ public class TStFeedbackController extends BaseController
|
|
|
TStFeedback feedback = tStFeedbackService.selectTStFeedbackById(tStFeedback.getId());
|
|
|
Long feedbackType = feedback.getFeedbackType();
|
|
|
if (feedbackType != null) {
|
|
|
- // 反馈类型为季度反馈
|
|
|
+ // 反馈类型为月度反馈
|
|
|
if (feedback.getFeedbackType() == 2) {
|
|
|
// 根据学员staffId获取用户对象
|
|
|
SysUser successor = sysUserService.selectUserByStaffId(feedback.getSuccessorId());
|
|
@@ -563,11 +577,18 @@ public class TStFeedbackController extends BaseController
|
|
|
SysUser mentor = sysUserService.selectUserByStaffId(feedback.getMentorId());
|
|
|
String mentorName = mentor.getNickName();
|
|
|
String mentorNameEN = PinyinHelper.convertToPinyinString(mentorName, " ", PinyinFormat.WITHOUT_TONE);
|
|
|
+ // 系统通知
|
|
|
+ SysMessage message = new SysMessage();
|
|
|
+ message.setUserId(successor.getUserId());
|
|
|
+ message.setMsgTitle("您有一条系统消息");
|
|
|
+ message.setMsgContent("您有一条月度反馈消息待查看");
|
|
|
// TODO: 部署前开启
|
|
|
// 邮件通知学员
|
|
|
-// MonthlyFeedbackMailThread monthlyFeedbackMailThread = new MonthlyFeedbackMailThread(mailService, email, successorName, successorNameEN, mentorName, mentorNameEN, feedbackYear, feedbackMonth);
|
|
|
-// Thread thread = new Thread(monthlyFeedbackMailThread);
|
|
|
-// thread.start();
|
|
|
+// MonthlyFeedbackMailThread monthlyFeedbackMailThread = new MonthlyFeedbackMailThread(
|
|
|
+// mailService, email, successorName, successorNameEN, mentorName, mentorNameEN,
|
|
|
+// feedbackYear, feedbackMonth, sysMessageService, message);
|
|
|
+// Thread thread = new Thread(monthlyFeedbackMailThread);
|
|
|
+// thread.start();
|
|
|
}
|
|
|
}
|
|
|
return toAjax(tStFeedbackService.updateTStFeedback(tStFeedback));
|