|
@@ -258,7 +258,7 @@ public class AgreementLogic {
|
|
|
|
|
|
}
|
|
|
|
|
|
- private void sendEmailFileIn(List<MailboxSendRecordPolicy> mailboxSendRecordPolicies, MailboxSendRecord mailboxSendRecord, Mailbox mailbox) {
|
|
|
+ private void sendEmailFileIn(List<MailboxSendRecordPolicy> mailboxSendRecordPolicies, MailboxSendRecord mailboxSendRecord, Mailbox mailbox) throws IOException {
|
|
|
String[] titles = new String[]{"序号","网点编号","网点名称","服务人员编号","服务人员名称","联系电话","身份证号码","保单名称","缴费金额",
|
|
|
"生效日期","截止日期","所属一级网点编号","所属一级网点编号","代买单位"};
|
|
|
List<List<Object>> rows = new ArrayList<>();
|
|
@@ -268,18 +268,11 @@ public class AgreementLogic {
|
|
|
row.add(i + 1);
|
|
|
row.add(record.getWebsitId());
|
|
|
row.add(record.getWebsitName());
|
|
|
- if (StringUtil.isEmpty(record.getReplaceName()))
|
|
|
- row.add("新增");
|
|
|
- else
|
|
|
- row.add("替换");
|
|
|
+
|
|
|
+ row.add(record.getPolicyNumber());
|
|
|
row.add(record.getPolicyName());
|
|
|
- row.add("居民身份证");
|
|
|
+ row.add(record.getPolicyMobile());
|
|
|
row.add(record.getPolicyIdcard());
|
|
|
- if (!StringUtil.isEmpty(record.getReplaceName())){
|
|
|
- row.add(record.getReplaceName());
|
|
|
- row.add("居民身份证");
|
|
|
- row.add(record.getReplaceIdcard());
|
|
|
- }
|
|
|
rows.add(row);
|
|
|
}
|
|
|
// 获取资源文件存放路径,用于临时存放生成的excel文件
|
|
@@ -288,7 +281,7 @@ public class AgreementLogic {
|
|
|
path = Objects.requireNonNull(this.getClass().getClassLoader().getResource("")).getPath();
|
|
|
}
|
|
|
// 文件名:采用UUID,防止多线程同时生成导致的文件重名
|
|
|
- String filePath = String.format("%s-%s.xlsx",path,mailboxSendRecord.getSendBatch()+"-雇主险");
|
|
|
+ String filePath = String.format("%s-%s.xlsx",path,mailboxSendRecord.getSendBatch()+"-工伤险");
|
|
|
ExcelData excelData = new ExcelData();
|
|
|
excelData.setTitles(Arrays.asList(titles));
|
|
|
ExcelUtils.createExcel(filePath,excelData);
|
|
@@ -300,7 +293,7 @@ public class AgreementLogic {
|
|
|
//分发邮件
|
|
|
|
|
|
for (String s : mailboxSendRecord.getReceiveMailbox().split(",|,")) {
|
|
|
- emailUtilsNew.send(s,mailbox.getSendPassword(),"雇主险-"+mailboxSendRecord.getSendBatch()+"-"+mailbox.getSendName(),"你好,以下是"+ DateUtil.format(new Date(),"yyyy-MM-dd")
|
|
|
+ emailUtilsNew.send(s,mailbox.getSendPassword(),"工伤险-"+mailboxSendRecord.getSendBatch()+"-"+mailbox.getSendName(),"你好,以下是"+ DateUtil.format(new Date(),"yyyy-MM-dd")
|
|
|
+mailbox.getSendName()+"保险人员名单详情见附件",filePath);
|
|
|
}
|
|
|
|