|
@@ -22,6 +22,7 @@ import com.gree.mall.manager.utils.excel.ExcelUtils;
|
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
import lombok.SneakyThrows;
|
|
|
+import lombok.extern.log4j.Log4j;
|
|
|
import org.apache.http.client.utils.DateUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -42,6 +43,7 @@ import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
+@Log4j
|
|
|
public class AgreementLogic {
|
|
|
|
|
|
@Autowired
|
|
@@ -250,7 +252,8 @@ public class AgreementLogic {
|
|
|
|
|
|
public void sendEmail(String sendBatch) throws IOException {
|
|
|
MailboxSendRecord mailboxSendRecord = mailboxSendRecordService.getById(sendBatch);
|
|
|
- List<MailboxSendRecordPolicy> mailboxSendRecordPolicies = mailboxSendRecordPolicyService.lambdaQuery().eq(MailboxSendRecordPolicy::getSendBatch, sendBatch).list();
|
|
|
+ List<MailboxSendRecordPolicy> mailboxSendRecordPolicies = mailboxSendRecordPolicyService.lambdaQuery()
|
|
|
+ .eq(MailboxSendRecordPolicy::getSendBatch, sendBatch).list();
|
|
|
|
|
|
Mailbox mailbox = mailboxService.getById("1");
|
|
|
|
|
@@ -267,9 +270,12 @@ public class AgreementLogic {
|
|
|
try {
|
|
|
this.sendEmailFile(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
|
|
|
mailboxSendRecord.setSendStatus("OK");
|
|
|
+ mailboxSendRecord.setSendTime(new Date());
|
|
|
mailboxSendRecord.updateById();
|
|
|
} catch (Exception e) {
|
|
|
+ log.error("发送意外保险失败"+e.toString());
|
|
|
mailboxSendRecord.setSendStatus("NO");
|
|
|
+ mailboxSendRecord.setSendTime(new Date());
|
|
|
mailboxSendRecord.updateById();
|
|
|
}
|
|
|
}
|
|
@@ -280,9 +286,12 @@ public class AgreementLogic {
|
|
|
try {
|
|
|
this.sendEmailFileEm(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
|
|
|
mailboxSendRecord.setSendStatus("OK");
|
|
|
+ mailboxSendRecord.setSendTime(new Date());
|
|
|
mailboxSendRecord.updateById();
|
|
|
} catch (Exception e) {
|
|
|
+ log.error("发送雇主保险失败"+e.toString());
|
|
|
mailboxSendRecord.setSendStatus("NO");
|
|
|
+ mailboxSendRecord.setSendTime(new Date());
|
|
|
mailboxSendRecord.updateById();
|
|
|
}
|
|
|
}
|
|
@@ -294,9 +303,12 @@ public class AgreementLogic {
|
|
|
try {
|
|
|
this.sendEmailFileIn(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
|
|
|
mailboxSendRecord.setSendStatus("OK");
|
|
|
+ mailboxSendRecord.setSendTime(new Date());
|
|
|
mailboxSendRecord.updateById();
|
|
|
} catch (Exception e) {
|
|
|
+ log.error("发送工伤保险失败"+e.toString());
|
|
|
mailboxSendRecord.setSendStatus("NO");
|
|
|
+ mailboxSendRecord.setSendTime(new Date());
|
|
|
mailboxSendRecord.updateById();
|
|
|
}
|
|
|
}
|