Commit 88baa04d authored by 侯彦文's avatar 侯彦文

修改案卷pdf名称

parent 4858ec2e
......@@ -286,6 +286,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
}
resultDatas.put("data", extFilesMap);
resultDatas.put("contextName", ifNull(dxContextProjectVO.getName()));
resultDatas.put("mj",ifNull(dxContextProjectVO.getSecretCode()));
String string = convertPdf("案卷目录模板.docx", resultDatas);
/*File pdfFile = new File(string);*/
MultipartFile multipartFile = DxObjFileUtils.createFile(string);
......@@ -325,7 +326,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
public String convertPdf(String modelName, Map<String, Object> dataMap) {
String targetPath = System.getProperty("user.dir") + "/TEMP/";
File wordFile = new File(targetPath + modelName);
File pdfFile2 = new File("TEMP/" + modelName + "---" + UUID.randomUUID() + ".pdf");
File pdfFile2 = new File("TEMP/" + dataMap.get("contextName") + "案卷目录" +"("+dataMap.get("mj") +")"+ ".pdf");
try {
InputStream tempStream2 = Files.newInputStream(wordFile.toPath());
OutputStream outputStream = Files.newOutputStream(pdfFile2.toPath());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment