|
@@ -12,16 +12,20 @@ import java.util.Date;
|
|
|
public class MeetingFeedbackMailThread implements Runnable {
|
|
|
|
|
|
private IMailService mailService;
|
|
|
- private String email;
|
|
|
- private String username;
|
|
|
- private String usernameEN;
|
|
|
- private String feedbackYear;
|
|
|
- private String feedbackSeason;
|
|
|
+ private String email; // 邮箱
|
|
|
+ private String username; // 用户名(中)
|
|
|
+ private String usernameEN; // 用户名(英)
|
|
|
+ private String feedbackYear; // 年
|
|
|
+ private String feedbackSeason; // 季度
|
|
|
+ private String meetingDate; // 会议日期
|
|
|
+ private String mentorNamesString; // 参会导师名单
|
|
|
|
|
|
public MeetingFeedbackMailThread() {
|
|
|
}
|
|
|
|
|
|
- public MeetingFeedbackMailThread(IMailService mailService, String email, String username, String usernameEN, String feedbackYear, String feedbackSeason) {
|
|
|
+ public MeetingFeedbackMailThread(IMailService mailService, String email, String username, String usernameEN, String feedbackYear, String feedbackSeason, String meetingDate, String mentorNamesString) {
|
|
|
+ this.mentorNamesString = mentorNamesString;
|
|
|
+ this.meetingDate = meetingDate;
|
|
|
this.mailService = mailService;
|
|
|
this.email = email;
|
|
|
this.username = username;
|
|
@@ -36,44 +40,44 @@ public class MeetingFeedbackMailThread implements Runnable {
|
|
|
}
|
|
|
|
|
|
private void sendMail() {
|
|
|
-// String jumpUrl = "/training/spec/myplan";
|
|
|
-// //写html开始内容
|
|
|
-// String start = "<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title></title></head><body><div style=\"background-color:#ECECEC; padding: 35px;\">" +
|
|
|
-// "<table cellpadding=\"0\" align=\"center\"" +
|
|
|
-// "style=\"width: 600px; margin: 0px auto; text-align: left; position: relative; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; font-size: 14px; font-family:微软雅黑, 黑体; line-height: 1.5; box-shadow: rgb(153, 153, 153) 0px 0px 5px; border-collapse: collapse; background-position: initial initial; background-repeat: initial initial;background:#fff;\">" +
|
|
|
-// "<tbody><tr><th valign=\"middle\" style=\"height: 25px; line-height: 25px; padding: 15px 35px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #42a3d3; background-color: #49bcff; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;\">" +
|
|
|
-// "<font face=\"微软雅黑\" size=\"5\" style=\"color: rgb(255, 255, 255); \">CPMS管理系统 </font><font face=\"微软雅黑\" size=\"3\" style=\"color: rgb(255, 255, 255); \">CPMS System</font></th></tr>";
|
|
|
-// //表html中间内容
|
|
|
-// String prime = "";
|
|
|
-// String center = "<tr><td><div style=\"padding:25px 35px 40px; background-color:#fff;\"><h2 style=\"margin: 5px 0px; \">" +
|
|
|
-// "<font color=\"#333333\" style=\"line-height: 20px; \"><font style=\"line-height: 22px; \" size=\"4\">" +
|
|
|
-// "亲爱的call username</font><br><font style=\"line-height: 22px; \" size=\"4\">" +
|
|
|
-// "Dear usernameEN</font></font></h2>" +
|
|
|
-// "<p>您的培训计划有新状态:<br>" +
|
|
|
-// "You have a new to-do task:<br>" +
|
|
|
-// "培训内容:<b>plantName</b><br>" +
|
|
|
-// "学习状态:<b>studyState</b><br>" +
|
|
|
-// "学员:<b>staffName</b><br>" +
|
|
|
-// "请登录<a href=\"https://cpms.basf-ypc.net.cn/cpms/index.html#jumpUrl\">CPMS管理系统</a>查看。<br>" +
|
|
|
-// "Please log in the <a href=\"https://cpms.basf-ypc.net.cn/cpms/index.html#jumpUrl\">CPMS</a> to handle it.</p>" +
|
|
|
-// "<p align=\"right\">date</p>" +
|
|
|
-// "<div style=\"width:700px;margin:0 auto;\">" +
|
|
|
-// "<div style=\"padding:10px 10px 0;border-top:1px solid #ccc;color:#747474;margin-bottom:20px;line-height:1.3em;font-size:12px;\">" +
|
|
|
-// "<p>此为系统邮件,请勿回复<br>This e-Mail is an automatic reminder sent by CPMS, please do not reply</p>" +
|
|
|
-// "</div></div></div></td></tr>";
|
|
|
-// String one = center.replaceFirst("username", username);
|
|
|
-// String two = one.replaceFirst("usernameEN", usernameEN);
|
|
|
-// String three = two.replaceFirst("plantName", tStPlan.getPlantName());
|
|
|
-// String four = three.replaceFirst("call",call);
|
|
|
-// String five = four.replaceFirst("studyState",studyState);
|
|
|
-// String seven = five.replaceFirst("staffName", tStPlan.getStaffName());
|
|
|
-// String result = seven.replaceFirst("date", String.valueOf(new Date())).replaceFirst("jumpUrl",jumpUrl).replaceFirst("jumpUrl",jumpUrl);
|
|
|
-// prime = prime + result;
|
|
|
-// //写html结尾内容
|
|
|
-// String end = "</tbody></table></div></body></html>";
|
|
|
-// //拼接html
|
|
|
-// String html = start + prime + end;
|
|
|
-// mailService.sendHtmlMail(email, "CPMS:您的培训计划"+ studyState +" (" + tStPlan.getPlantName() + ")", html);
|
|
|
+ String jumpUrl = "/training/spec/seasonalfeedback";
|
|
|
+ //写html开始内容
|
|
|
+ String start = "<!DOCTYPE html><html><head><meta charset=\"utf-8\"><title></title></head><body><div style=\"background-color:#ECECEC; padding: 35px;\">" +
|
|
|
+ "<table cellpadding=\"0\" align=\"center\"" +
|
|
|
+ "style=\"width: 600px; margin: 0px auto; text-align: left; position: relative; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; font-size: 14px; font-family:微软雅黑, 黑体; line-height: 1.5; box-shadow: rgb(153, 153, 153) 0px 0px 5px; border-collapse: collapse; background-position: initial initial; background-repeat: initial initial;background:#fff;\">" +
|
|
|
+ "<tbody><tr><th valign=\"middle\" style=\"height: 25px; line-height: 25px; padding: 15px 35px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #42a3d3; background-color: #49bcff; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;\">" +
|
|
|
+ "<font face=\"微软雅黑\" size=\"5\" style=\"color: rgb(255, 255, 255); \">CPMS管理系统 </font><font face=\"微软雅黑\" size=\"3\" style=\"color: rgb(255, 255, 255); \">CPMS System</font></th></tr>";
|
|
|
+ //表html中间内容
|
|
|
+ String prime = "";
|
|
|
+ String center = "<tr><td><div style=\"padding:25px 35px 40px; background-color:#fff;\"><h2 style=\"margin: 5px 0px; \">" +
|
|
|
+ "<font color=\"#333333\" style=\"line-height: 20px; \"><font style=\"line-height: 22px; \" size=\"4\">" +
|
|
|
+ "亲爱的username</font><br><font style=\"line-height: 22px; \" size=\"4\">" +
|
|
|
+ "Dear usernameEN</font></font></h2>" +
|
|
|
+ "<p>您的季度汇报有新状态:<br>" +
|
|
|
+ "You have a new to-do task:<br>" +
|
|
|
+ "汇报内容:<b>feedbackYear年第feedbackSeason季度汇报</b><br>" +
|
|
|
+ "会议日期:<b>meetingDate</b><br>" +
|
|
|
+ "参会导师:<b>mentorNamesString</b><br>" +
|
|
|
+ "请登录<a href=\"https://cpms.basf-ypc.net.cn/cpms/index.html#jumpUrl\">CPMS管理系统</a>查看。<br>" +
|
|
|
+ "Please log in the <a href=\"https://cpms.basf-ypc.net.cn/cpms/index.html#jumpUrl\">CPMS</a> to handle it.</p>" +
|
|
|
+ "<p align=\"right\">date</p>" +
|
|
|
+ "<div style=\"width:700px;margin:0 auto;\">" +
|
|
|
+ "<div style=\"padding:10px 10px 0;border-top:1px solid #ccc;color:#747474;margin-bottom:20px;line-height:1.3em;font-size:12px;\">" +
|
|
|
+ "<p>此为系统邮件,请勿回复<br>This e-Mail is an automatic reminder sent by CPMS, please do not reply</p>" +
|
|
|
+ "</div></div></div></td></tr>";
|
|
|
+ String one = center.replaceFirst("username", username);
|
|
|
+ String two = one.replaceFirst("usernameEN", usernameEN);
|
|
|
+ String three = two.replaceFirst("feedbackYear", feedbackYear);
|
|
|
+ String four = three.replaceFirst("feedbackSeason",feedbackSeason);
|
|
|
+ String five = four.replaceFirst("meetingDate",meetingDate);
|
|
|
+ String six = five.replaceFirst("mentorNamesString",mentorNamesString);
|
|
|
+ String result = six.replaceFirst("date", String.valueOf(new Date())).replaceFirst("jumpUrl",jumpUrl).replaceFirst("jumpUrl",jumpUrl);
|
|
|
+ prime = prime + result;
|
|
|
+ //写html结尾内容
|
|
|
+ String end = "</tbody></table></div></body></html>";
|
|
|
+ //拼接html
|
|
|
+ String html = start + prime + end;
|
|
|
+ mailService.sendHtmlMail(email, "CPMS:您的导师已提交季度汇报反馈 (" + feedbackYear + "年第" + feedbackSeason + "季度)", html);
|
|
|
}
|
|
|
|
|
|
}
|