|
@@ -77,7 +77,7 @@ public class NavEmailParser extends AbstractEmailParser {
|
|
|
// 3.解析邮件pdf附件
|
|
|
if (StrUtil.isNotBlank(emailContentInfoDTO.getFilePath()) && ExcelUtil.isPdf(emailContentInfoDTO.getFileName())) {
|
|
|
String excelFilePath = path + emailContentInfoDTO.getEmailAddress() + "/" + emailContentInfoDTO.getEmailDate().substring(0, 10).replaceAll("-", "")
|
|
|
- + "/" + emailContentInfoDTO.getFileName().replace(".pdf", ".xlsx").replace(".PDF", ".xlsx");
|
|
|
+ + "/" + emailContentInfoDTO.getFileName().replace(".pdf", System.currentTimeMillis()+".xlsx").replace(".PDF", System.currentTimeMillis()+".xlsx");
|
|
|
List<EmailFundNavDTO> fundNavDTOList = parsePdfFile(emailContentInfoDTO.getFilePath(), excelFilePath, emailFieldMap);
|
|
|
Optional.ofNullable(fundNavDTOList).ifPresent(emailFundNavDTOList::addAll);
|
|
|
}
|
|
@@ -158,7 +158,7 @@ public class NavEmailParser extends AbstractEmailParser {
|
|
|
private List<EmailFundNavDTO> parseZipFile(EmailContentInfoDTO emailContentInfoDTO, String zipFilePath, Map<String, List<String>> emailFieldMap) {
|
|
|
List<EmailFundNavDTO> fundNavDTOList = CollUtil.newArrayList();
|
|
|
if (ExcelUtil.isPdf(zipFilePath)) {
|
|
|
- String excelFilePath = zipFilePath.replace(".pdf", ".xlsx").replace(".PDF", ".xlsx");
|
|
|
+ String excelFilePath = zipFilePath.replace(".pdf", System.currentTimeMillis()+".xlsx").replace(".PDF", System.currentTimeMillis()+".xlsx");
|
|
|
fundNavDTOList = parsePdfFile(zipFilePath, excelFilePath, emailFieldMap);
|
|
|
}
|
|
|
if (ExcelUtil.isExcel(zipFilePath)) {
|