|
@@ -37,13 +37,13 @@ import org.activiti.engine.impl.util.CollectionUtil;
|
|
|
import org.activiti.engine.runtime.ProcessInstance;
|
|
|
import org.activiti.engine.task.Task;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.io.File;
|
|
|
-import java.io.IOException;
|
|
|
+import java.io.*;
|
|
|
import java.nio.file.Files;
|
|
|
import java.nio.file.NoSuchFileException;
|
|
|
import java.nio.file.Paths;
|
|
@@ -1639,6 +1639,18 @@ public class TPssrApproveController extends BaseController {
|
|
|
// Files.copy(Paths.get(path), Paths.get(rootPath + subTitle + msg.replace("/profile/pssr/", "")), StandardCopyOption.REPLACE_EXISTING);//拷贝导出的文件
|
|
|
// files.add(new File(rootPath + subTitle + msg));
|
|
|
|
|
|
+ // word转pdf
|
|
|
+ FileInputStream fis = new FileInputStream(path);
|
|
|
+ XWPFDocument document = new XWPFDocument(fis);
|
|
|
+ OutputStream out = new FileOutputStream(path.replace(".docx", ".pdf"));
|
|
|
+ document.write(out);
|
|
|
+ out.close();
|
|
|
+ fis.close();
|
|
|
+ this.copyFileIgnoreException(path.replace(".docx", ".pdf"),
|
|
|
+ rootPath + subTitle + msg.replace("/profile/pssr/", "").replace(".docx", ".pdf"),
|
|
|
+ files,
|
|
|
+ rootPath + subTitle + msg.replace(".docx", ".pdf"));
|
|
|
+
|
|
|
for (TPssrSubcontent tPssrSubcontent : tPssrSubcontents) {
|
|
|
TPssrPatrol patrol = new TPssrPatrol();
|
|
|
patrol.setSubId(tPssrSubcontent.getId());
|