|
@@ -153,7 +153,7 @@ public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMappe
|
|
localFileList.add(new PdfDto(pdfFile.getPath(), PageSizeEnum.A3, pdfDto.getPageCount()));
|
|
localFileList.add(new PdfDto(pdfFile.getPath(), PageSizeEnum.A3, pdfDto.getPageCount()));
|
|
fileMd5 = DigestUtils.md5Hex(new FileInputStream(pdfFile));
|
|
fileMd5 = DigestUtils.md5Hex(new FileInputStream(pdfFile));
|
|
ossUtil.ossUpload(pdfDirName, pdfFile, BinaryUtil.toBase64String(HexUtils.decodeHex(fileMd5)));
|
|
ossUtil.ossUpload(pdfDirName, pdfFile, BinaryUtil.toBase64String(HexUtils.decodeHex(fileMd5)));
|
|
-// localHtmlFile.delete();
|
|
|
|
|
|
+ localHtmlFile.delete();
|
|
jsonObject.put(SystemConstant.PDF_PATH, pdfDirName);
|
|
jsonObject.put(SystemConstant.PDF_PATH, pdfDirName);
|
|
} else {//上传至服务器
|
|
} else {//上传至服务器
|
|
File finalFile = new File(stringJoiner.toString());
|
|
File finalFile = new File(stringJoiner.toString());
|
|
@@ -311,7 +311,7 @@ public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMappe
|
|
if (oss) {//上传至oss
|
|
if (oss) {//上传至oss
|
|
pdfDto = PdfUtil.addPdfPage(pdfFile);
|
|
pdfDto = PdfUtil.addPdfPage(pdfFile);
|
|
ossUtil.ossUpload(pdfDirNameStr, pdfFile, BinaryUtil.toBase64String(HexUtils.decodeHex(pdfFileMd5)));
|
|
ossUtil.ossUpload(pdfDirNameStr, pdfFile, BinaryUtil.toBase64String(HexUtils.decodeHex(pdfFileMd5)));
|
|
-// htmlFile.delete();
|
|
|
|
|
|
+ htmlFile.delete();
|
|
}
|
|
}
|
|
JSONObject attachmentPath = JSONObject.parseObject(examDetail.getAttachmentPath());
|
|
JSONObject attachmentPath = JSONObject.parseObject(examDetail.getAttachmentPath());
|
|
attachmentPath = Objects.isNull(attachmentPath) ? new JSONObject() : attachmentPath;
|
|
attachmentPath = Objects.isNull(attachmentPath) ? new JSONObject() : attachmentPath;
|