更改保存方式

This commit is contained in:
付庆吉
2021-08-20 17:01:06 +08:00
parent e1a3a317e7
commit ba8b916278

View File

@ -106,7 +106,7 @@ public class ExpertSignatureServiceImpl implements ExpertSignatureService {
} }
//保存合并后的文档 //保存合并后的文档
d1.saveToFile(mkdir(path + "/merged.docx"), FileFormat.Docx_2010); d1.saveToFile(path + "/merged.docx", FileFormat.Docx_2010);
//转为pdf //转为pdf
long l = System.currentTimeMillis(); long l = System.currentTimeMillis();
@ -187,7 +187,7 @@ public class ExpertSignatureServiceImpl implements ExpertSignatureService {
XWPFTemplate template = XWPFTemplate.compile(file).render(all); XWPFTemplate template = XWPFTemplate.compile(file).render(all);
FileInputStream fis = null; FileInputStream fis = null;
try { try {
String docPath = mkdir(path + "/expertSignature.docx"); String docPath = path + "/expertSignature.docx";
template.writeToFile(docPath); template.writeToFile(docPath);
fis = new FileInputStream(new File(docPath)); fis = new FileInputStream(new File(docPath));