|
@@ -29,10 +29,11 @@ public class SaiApplyMailThread implements Runnable {
|
|
|
private TSaiApply tSaiApply;
|
|
|
private String staffName;
|
|
|
private String staffNameEN;
|
|
|
+ private String loginName;
|
|
|
|
|
|
public SaiApplyMailThread() {}
|
|
|
|
|
|
- public SaiApplyMailThread(IMailService mailService, ISysMessageService sysMessageService, SysMessage message, String email, Task task, TSaiApply tSaiApply, String staffName) throws PinyinException {
|
|
|
+ public SaiApplyMailThread(IMailService mailService, ISysMessageService sysMessageService, SysMessage message, String email, Task task, TSaiApply tSaiApply, String staffName, String loginName) throws PinyinException {
|
|
|
this.mailService = mailService;
|
|
|
this.sysMessageService = sysMessageService;
|
|
|
this.email = email;
|
|
@@ -41,6 +42,7 @@ public class SaiApplyMailThread implements Runnable {
|
|
|
this.tSaiApply = tSaiApply;
|
|
|
this.staffName = staffName;
|
|
|
this.staffNameEN = PinyinHelper.convertToPinyinString(staffName.trim(), " ", PinyinFormat.WITHOUT_TONE);
|
|
|
+ this.loginName = loginName;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -62,7 +64,7 @@ public class SaiApplyMailThread implements Runnable {
|
|
|
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\">" +
|
|
|
"亲爱的staffName</font><br><font style=\"line-height: 22px; \" size=\"4\">" +
|
|
|
- "Dear staffNameEN</font></font></h2>" +
|
|
|
+ "Dear staffNameEN(loginName)</font></font></h2>" +
|
|
|
"<p>您有新的SAI开项申请待办任务,详情如下:<br>" +
|
|
|
"You have a new to-do task:<br>" +
|
|
|
"流程编号:<b>processId</b><br>" +
|
|
@@ -78,11 +80,12 @@ public class SaiApplyMailThread implements Runnable {
|
|
|
"</div></div></div></td></tr>";
|
|
|
String one = center.replaceFirst("staffName", staffName);
|
|
|
String two = one.replaceFirst("staffNameEN", staffNameEN);
|
|
|
- String three = two.replaceFirst("processId", tSaiApply.getProcessId());
|
|
|
- String four = three.replaceFirst("taskName", task.getName());
|
|
|
- String five = four.replaceFirst("taskDescription", tSaiApply.getDescription());
|
|
|
- String six = five.replaceFirst("taskApplyDate", new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(tSaiApply.getApplyDate()));
|
|
|
- String result = six.replaceFirst("date", String.valueOf(new Date())).replaceFirst("jumpUrl",jumpUrl).replaceFirst("jumpUrl",jumpUrl);
|
|
|
+ String three = two.replaceFirst("loginName", loginName);
|
|
|
+ String four = three.replaceFirst("processId", tSaiApply.getProcessId());
|
|
|
+ String five = four.replaceFirst("taskName", task.getName());
|
|
|
+ String six = five.replaceFirst("taskDescription", tSaiApply.getDescription());
|
|
|
+ String seven = six.replaceFirst("taskApplyDate", new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(tSaiApply.getApplyDate()));
|
|
|
+ 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>";
|