|
@@ -131,10 +131,6 @@ public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMappe
|
|
String destUrl = SystemConstant.PDF_TEMP_FILES_DIR + File.separator + pdfDirName;
|
|
String destUrl = SystemConstant.PDF_TEMP_FILES_DIR + File.separator + pdfDirName;
|
|
HtmlToPdfUtil.convert(localHtmlFile.getPath(), destUrl, PageSizeEnum.A3);
|
|
HtmlToPdfUtil.convert(localHtmlFile.getPath(), destUrl, PageSizeEnum.A3);
|
|
File pdfFile = new File(destUrl);
|
|
File pdfFile = new File(destUrl);
|
|
- if (!pdfFile.getParentFile().exists()) {
|
|
|
|
- pdfFile.getParentFile().mkdirs();
|
|
|
|
- pdfFile.createNewFile();
|
|
|
|
- }
|
|
|
|
int pageCount = PdfUtil.addPdfPage(pdfFile);
|
|
int pageCount = PdfUtil.addPdfPage(pdfFile);
|
|
localFileList.add(new PdfDto(pdfFile.getPath(), PageSizeEnum.A3, pageCount));
|
|
localFileList.add(new PdfDto(pdfFile.getPath(), PageSizeEnum.A3, pageCount));
|
|
fileMd5 = DigestUtils.md5Hex(new FileInputStream(pdfFile));
|
|
fileMd5 = DigestUtils.md5Hex(new FileInputStream(pdfFile));
|
|
@@ -241,10 +237,6 @@ public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMappe
|
|
String destUrl = SystemConstant.PDF_TEMP_FILES_DIR + File.separator + pdfDirName;
|
|
String destUrl = SystemConstant.PDF_TEMP_FILES_DIR + File.separator + pdfDirName;
|
|
HtmlToPdfUtil.convert(htmlFile.getPath(), destUrl, PageSizeEnum.A4);
|
|
HtmlToPdfUtil.convert(htmlFile.getPath(), destUrl, PageSizeEnum.A4);
|
|
File pdfFile = new File(destUrl);
|
|
File pdfFile = new File(destUrl);
|
|
- if (!pdfFile.getParentFile().exists()) {
|
|
|
|
- pdfFile.getParentFile().mkdirs();
|
|
|
|
- pdfFile.createNewFile();
|
|
|
|
- }
|
|
|
|
String fileMd5 = DigestUtils.md5Hex(new FileInputStream(pdfFile));
|
|
String fileMd5 = DigestUtils.md5Hex(new FileInputStream(pdfFile));
|
|
int pageCount = 0;
|
|
int pageCount = 0;
|
|
if (oss) {
|
|
if (oss) {
|