zhuo
2025-03-10 dc117073451537b5142ffc00fda2fa9a37ff5e48
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
@@ -39,6 +39,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.xwpf.usermodel.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ClassPathResource;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -83,8 +84,7 @@
    private String wordUrl;
    @Value("${file.path}")
    private String imgUrl;
    @Value("${file.licenseUrl}")
    private String licenseUrl;
    @Resource
    private InsOrderMapper insOrderMapper;
    @Resource
@@ -537,6 +537,11 @@
            }
            // 压缩临时文件夹
            zipFilePath = wordUrl + "/zip/output.zip";
            // 判断zip路径是否存在
            File zipDir = new File(wordUrl + "/zip");
            if(!zipDir.isDirectory()){
                zipDir.mkdirs();
            }
            zipDirectory(tempFolderPath, zipFilePath);
            // 清理临时文件夹
@@ -676,7 +681,7 @@
        FileOutputStream os = null;
        try {
            //凭证 不然切换后有水印
            InputStream is = Files.newInputStream(new File(licenseUrl).toPath());
            InputStream is = new ClassPathResource("/lib/license.xml").getInputStream();
            License license = new License();
            license.setLicense(is);
            if (!license.getIsLicensed()) {
@@ -1115,7 +1120,7 @@
        FileOutputStream os = null;
        try {
            //凭证 不然切换后有水印
            InputStream is = Files.newInputStream(new File(licenseUrl).toPath());
            InputStream is = new ClassPathResource("/lib/license.xml").getInputStream();
            License license = new License();
            license.setLicense(is);
            if (!license.getIsLicensed()) {