|
@@ -207,16 +207,16 @@ public class NavEmailParser extends AbstractEmailParser {
|
|
|
Document doc = Jsoup.parse(emailContent);
|
|
|
Element table = doc.select("table").first();
|
|
|
Elements rows = table.select("tr");
|
|
|
- String excelFilePath = "/data/file/content/" + emailContentInfoDTO.getEmailAddress() + "/" + emailContentInfoDTO.getEmailDate().substring(0, 10).replaceAll("-", "") + "/"
|
|
|
+ String excelFilePath = path + "/content/" + emailContentInfoDTO.getEmailAddress() + "/" + emailContentInfoDTO.getEmailDate().substring(0, 10).replaceAll("-", "") + "/"
|
|
|
+ emailContentInfoDTO.getFileName().replace(".html", ".xlsx");
|
|
|
- File savefile = new File(excelFilePath);
|
|
|
- if (!savefile.exists()) {
|
|
|
- if (!savefile.getParentFile().exists()) {
|
|
|
- savefile.getParentFile().mkdirs();
|
|
|
- savefile.getParentFile().setExecutable(true);
|
|
|
+ File saveFile = new File(excelFilePath);
|
|
|
+ if (!saveFile.exists()) {
|
|
|
+ if (!saveFile.getParentFile().exists()) {
|
|
|
+ saveFile.getParentFile().mkdirs();
|
|
|
+ saveFile.getParentFile().setExecutable(true);
|
|
|
}
|
|
|
}
|
|
|
- try (OutputStream outputStream = new FileOutputStream(savefile)) {
|
|
|
+ try (OutputStream outputStream = new FileOutputStream(saveFile)) {
|
|
|
// 创建一个新的Excel工作簿
|
|
|
Workbook workbook = new XSSFWorkbook();
|
|
|
Sheet sheet = workbook.createSheet("Sheet1");
|