|
|
|
@ -1471,16 +1471,16 @@ public class ErfExpApplyServiceImpl extends ServiceImpl<ErfExpApplyMapper, ErfEx |
|
|
|
} |
|
|
|
|
|
|
|
String todayStr = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(LocalDateTime.now()); |
|
|
|
String submitDateStr = entity.getSubmitTime() != null |
|
|
|
String expectedFinishDateStr = entity.getExpectedFinishDate() != null |
|
|
|
? DateTimeFormatter.ofPattern("yyyy-MM-dd") |
|
|
|
.format(entity.getSubmitTime().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDateTime()) |
|
|
|
.format(entity.getExpectedFinishDate().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDateTime()) |
|
|
|
: todayStr; |
|
|
|
|
|
|
|
String subject = String.format("【工程实验申请下达通知】%s - %s", |
|
|
|
entity.getApplyNo(), entity.getTitle() != null ? entity.getTitle() : ""); |
|
|
|
|
|
|
|
// 构建邮件正文(内容固定,收件人不同) |
|
|
|
String tableBody = buildPlannerNotificationTable(entity, todayStr, submitDateStr); |
|
|
|
String tableBody = buildPlannerNotificationTable(entity, todayStr, expectedFinishDateStr); |
|
|
|
|
|
|
|
List<String> successEmails = new ArrayList<>(); |
|
|
|
|
|
|
|
@ -1528,7 +1528,7 @@ public class ErfExpApplyServiceImpl extends ServiceImpl<ErfExpApplyMapper, ErfEx |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private String buildPlannerNotificationTable(ErfExpApply entity, String todayStr, String submitDateStr) { |
|
|
|
private String buildPlannerNotificationTable(ErfExpApply entity, String todayStr, String expectedFinishDateStr) { |
|
|
|
return "<table border='1' cellpadding='6' cellspacing='0' " |
|
|
|
+ "style='border-collapse:collapse; width:100%; font-size:13px;'>" |
|
|
|
+ "<thead style='background-color:#2196F3; color:white;'><tr>" |
|
|
|
@ -1542,7 +1542,7 @@ public class ErfExpApplyServiceImpl extends ServiceImpl<ErfExpApplyMapper, ErfEx |
|
|
|
+ "<td>" + (entity.getProcessRequirement() != null ? entity.getProcessRequirement() : "") + "</td>" |
|
|
|
+ "<td>" + (entity.getQuantityReq() != null ? entity.getQuantityReq() : "") + "</td>" |
|
|
|
+ "<td>" + (entity.getRemark() != null ? entity.getRemark() : "") + "</td>" |
|
|
|
+ "<td>" + submitDateStr + "</td>" |
|
|
|
+ "<td>" + expectedFinishDateStr + "</td>" |
|
|
|
+ "<td>" + (entity.getCreatorName() != null ? entity.getCreatorName() : "") + "</td>" |
|
|
|
+ "</tr></tbody></table>"; |
|
|
|
} |
|
|
|
|