|
@@ -270,13 +270,16 @@ public class AgreementLogic {
|
|
|
|
|
|
//发邮件
|
|
|
try {
|
|
|
- this.sendEmailFile(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
|
|
|
MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
|
|
|
mailboxSendRecord1.setId(mailboxSendRecord.getId());
|
|
|
mailboxSendRecord1.setSendStatus("OK");
|
|
|
mailboxSendRecord1.setSendTime(new Date());
|
|
|
mailboxSendRecord1.updateById();
|
|
|
+
|
|
|
+ this.sendEmailFile(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
log.error("发送意外保险失败"+e.toString());
|
|
|
MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
|
|
|
mailboxSendRecord1.setId(mailboxSendRecord.getId());
|
|
@@ -290,13 +293,15 @@ public class AgreementLogic {
|
|
|
|
|
|
//发邮件
|
|
|
try {
|
|
|
- this.sendEmailFileEm(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
|
|
|
MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
|
|
|
mailboxSendRecord1.setId(mailboxSendRecord.getId());
|
|
|
mailboxSendRecord1.setSendStatus("OK");
|
|
|
mailboxSendRecord1.setSendTime(new Date());
|
|
|
mailboxSendRecord1.updateById();
|
|
|
+ this.sendEmailFileEm(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
log.error("发送雇主保险失败"+e.toString());
|
|
|
MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
|
|
|
mailboxSendRecord1.setId(mailboxSendRecord.getId());
|
|
@@ -311,13 +316,15 @@ public class AgreementLogic {
|
|
|
|
|
|
//发邮件
|
|
|
try {
|
|
|
- this.sendEmailFileIn(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
|
|
|
MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
|
|
|
mailboxSendRecord1.setId(mailboxSendRecord.getId());
|
|
|
mailboxSendRecord1.setSendStatus("OK");
|
|
|
mailboxSendRecord1.setSendTime(new Date());
|
|
|
mailboxSendRecord1.updateById();
|
|
|
+ this.sendEmailFileIn(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
log.error("发送工伤保险失败"+e.toString());
|
|
|
MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
|
|
|
mailboxSendRecord1.setId(mailboxSendRecord.getId());
|
|
@@ -364,11 +371,9 @@ public class AgreementLogic {
|
|
|
|
|
|
//分发邮件
|
|
|
Session session = emailUtilsNew.loadMailSession();
|
|
|
- for (String s : mailboxSendRecord.getReceiveMailbox().split(",|,")) {
|
|
|
|
|
|
- emailUtilsNew.send(session,s, mailbox.getSendMailbox(), "工伤险-" + mailboxSendRecord.getSendBatch() + "-" + mailbox.getSendName(), "你好,以下是" + DateUtil.format(new Date(), "yyyy-MM-dd")
|
|
|
+ emailUtilsNew.send(session,mailboxSendRecord.getReceiveMailbox(), mailbox.getSendMailbox(), "工伤险-" + mailboxSendRecord.getSendBatch() + "-" + mailbox.getSendName(), "你好,以下是" + DateUtil.format(new Date(), "yyyy-MM-dd")
|
|
|
+ mailbox.getSendName() + "保险人员名单详情见附件", filePath);
|
|
|
- }
|
|
|
|
|
|
|
|
|
//删除该文件
|
|
@@ -416,10 +421,9 @@ public class AgreementLogic {
|
|
|
|
|
|
//分发邮件
|
|
|
Session session = emailUtilsNew.loadMailSession();
|
|
|
- for (String s : mailboxSendRecord.getReceiveMailbox().split(",|,")) {
|
|
|
- emailUtilsNew.send(session,s, mailbox.getSendMailbox(), "雇主险-" + mailboxSendRecord.getSendBatch() + "-" + mailbox.getSendName(), "你好,以下是" + DateUtil.format(new Date(), "yyyy-MM-dd")
|
|
|
- + mailbox.getSendName() + "保险人员名单详情见附件", filePath);
|
|
|
- }
|
|
|
+
|
|
|
+ emailUtilsNew.send(session,mailboxSendRecord.getReceiveMailbox(), mailbox.getSendMailbox(), "雇主险-" + mailboxSendRecord.getSendBatch() + "-" + mailbox.getSendName(), "你好,以下是" + DateUtil.format(new Date(), "yyyy-MM-dd")
|
|
|
+ + mailbox.getSendName() + "保险人员名单详情见附件", filePath);
|
|
|
|
|
|
|
|
|
//删除该文件
|
|
@@ -469,12 +473,9 @@ public class AgreementLogic {
|
|
|
|
|
|
//分发邮件
|
|
|
Session session = emailUtilsNew.loadMailSession();
|
|
|
- for (String s : mailboxSendRecord.getReceiveMailbox().split(",|,")) {
|
|
|
- emailUtilsNew.send(session,s, mailbox.getSendMailbox(), "意外险-" + mailboxSendRecord.getSendBatch() + "-" + mailbox.getSendName(), "你好,以下是" + DateUtil.format(new Date(), "yyyy-MM-dd")
|
|
|
- + mailbox.getSendName() + "保险人员名单详情见附件", filePath);
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
+ emailUtilsNew.send(session,mailboxSendRecord.getReceiveMailbox(), mailbox.getSendMailbox(), "意外险-" + mailboxSendRecord.getSendBatch() + "-" + mailbox.getSendName(), "你好,以下是" + DateUtil.format(new Date(), "yyyy-MM-dd")
|
|
|
+ + mailbox.getSendName() + "保险人员名单详情见附件", filePath);
|
|
|
|
|
|
//删除该文件
|
|
|
excel.delete();
|