inspect-server/src/main/java/com/yuanchu/mom/utils/WordUtils.java
@@ -25,6 +25,7 @@
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STMerge;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.io.*;
import java.nio.file.Files;
@@ -1486,22 +1487,13 @@
                lable.getAndIncrement();
            });
        });
        String url;
        try {
            ZipSecureFile.setMinInflateRatio(0.0001);
            InputStream inputStream = this.getClass().getResourceAsStream("/static/word1.docx");
            File file = File.createTempFile("temp", ".tmp");
            OutputStream outputStream = new FileOutputStream(file);
            IOUtils.copy(inputStream, outputStream);
            url = file.getAbsolutePath();
        } catch (FileNotFoundException e) {
            throw new ErrorException("找不到模板文件");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        ZipSecureFile.setMinInflateRatio(0.0001);
        InputStream inputStream = this.getClass().getResourceAsStream("/static/word1.docx");
        ConfigureBuilder builder = Configure.builder();
        builder.useSpringEL(true);
        XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render(
        XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render(
                new HashMap<String, Object>() {{
                    put("title", title);
                    put("tables", tables);
@@ -1519,7 +1511,7 @@
            FileInputStream stream = new FileInputStream(path);
            XWPFDocument document = new XWPFDocument(stream);
            List<XWPFTable> xwpfTables = document.getTables();
            for (int i = 1; i < xwpfTables.size(); i++) {
            for (int i = 0; i < xwpfTables.size(); i++) {
                Set<String> set1 = new HashSet<>();
                Map<String, Map<String, Integer>> maps = new HashMap<>();
                for (int j = 0; j < xwpfTables.get(i).getRows().size(); j++) {
@@ -2089,20 +2081,8 @@
                tables4.add(table4);
            }
        }
        String url;
        try {
            ZipSecureFile.setMinInflateRatio(0.0001);
            InputStream inputStream = this.getClass().getResourceAsStream("/static/report-template.docx");
            File file = File.createTempFile("temp", ".tmp");
            OutputStream outputStream = new FileOutputStream(file);
            IOUtils.copy(inputStream, outputStream);
            url = file.getAbsolutePath();
        } catch (FileNotFoundException e) {
            throw new ErrorException("找不到模板文件");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        ZipSecureFile.setMinInflateRatio(0.0001);
        InputStream inputStream = this.getClass().getResourceAsStream("/static/report-template.docx");
        StringBuilder standardMethod2 = new StringBuilder();
        for (String s : standardMethod) {
            standardMethod2.append(";\n").append(s);
@@ -2180,7 +2160,7 @@
            title3 = "辐射方向图参数";
        }
        String finalTitle = title3;
        XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render(
        XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render(
                new HashMap<String, Object>() {{
                    put("order", insOrder);
                    put("report", insReport);
@@ -3745,7 +3725,6 @@
            } else {
                table.getRow(row).getCell(i).getCTTc().addNewTcPr().addNewHMerge().setVal(STMerge.CONTINUE);
            }
        }
    }