|
@@ -192,7 +192,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
|
|
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)));
|
|
- fileStoreUtil.ossUpload(pdfDirNameStr, pdfFile, pdfFileMd5, fileStoreUtil.getUploadEnumByPath(pdfDirNameStr).getFssType());
|
|
|
|
|
|
+ fileStoreUtil.ossUpload(pdfDirNameStr, pdfFile, BinaryUtil.toBase64String(HexUtils.decodeHex(pdfFileMd5)), fileStoreUtil.getUploadEnumByPath(pdfDirNameStr).getFssType());
|
|
// htmlFile.delete();
|
|
// htmlFile.delete();
|
|
}
|
|
}
|
|
JSONObject attachmentPath = JSONObject.parseObject(examDetail.getAttachmentPath());
|
|
JSONObject attachmentPath = JSONObject.parseObject(examDetail.getAttachmentPath());
|
|
@@ -335,9 +335,10 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 保存html附件和该html转成pdf的附件
|
|
* 保存html附件和该html转成pdf的附件
|
|
- * @param fileName 文件名称
|
|
|
|
|
|
+ *
|
|
|
|
+ * @param fileName 文件名称
|
|
* @param htmlContent html内容
|
|
* @param htmlContent html内容
|
|
- * @param userId 创建人
|
|
|
|
|
|
+ * @param userId 创建人
|
|
* @return 两个附件对象
|
|
* @return 两个附件对象
|
|
*/
|
|
*/
|
|
@Transactional
|
|
@Transactional
|
|
@@ -396,7 +397,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
|
|
// htmlMd5
|
|
// htmlMd5
|
|
jsonObject.put("htmlMd5", DigestUtils.md5Hex(new FileInputStream(localHtmlFile)));
|
|
jsonObject.put("htmlMd5", DigestUtils.md5Hex(new FileInputStream(localHtmlFile)));
|
|
jsonObject.put("pdfMd5", fileMd5);
|
|
jsonObject.put("pdfMd5", fileMd5);
|
|
- }else {//上传至服务器
|
|
|
|
|
|
+ } else {//上传至服务器
|
|
File finalFile = new File(stringJoiner.toString());
|
|
File finalFile = new File(stringJoiner.toString());
|
|
if (!finalFile.exists()) {
|
|
if (!finalFile.exists()) {
|
|
finalFile.getParentFile().mkdirs();
|
|
finalFile.getParentFile().mkdirs();
|