From 0debf5b7bb0246eaef1397975cdb16f4adb9e8d9 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 29 十月 2026 14:36:31 +0800
Subject: [PATCH] refactor(inspection-order): 1.检验委托单绑定机制支持多次下单 2.合格率统计口径调整 3.外购铜导体推送入库MES增加米重 4.报告英文字段调整

---
 inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
index 3bda5d4..3ccac7e 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
@@ -43,6 +43,7 @@
 import com.ruoyi.system.mapper.UserMapper;
 import com.ruoyi.system.service.InformationNotificationService;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.openxml4j.util.ZipSecureFile;
 import org.apache.poi.xwpf.usermodel.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -524,7 +525,18 @@
 
     @Override
     public int wordInsertUrl(Map<String, Object> map, String url) {
-        XWPFTemplate template = XWPFTemplate.compile(url).render(map);
+        XWPFTemplate template;
+        synchronized (ZipSecureFile.class) {
+            double originalMinInflateRatio = ZipSecureFile.getMinInflateRatio();
+            try {
+                // 鍏煎鎶ュ憡涓帇缂╃巼杈冮珮鐨勭函鑹�/閫忔槑 PNG锛岀紪璇戝悗绔嬪嵆鎭㈠ POI 瀹夊叏闃堝�笺��
+                ZipSecureFile.setMinInflateRatio(0.001D);
+                template = XWPFTemplate.compile(url);
+            } finally {
+                ZipSecureFile.setMinInflateRatio(originalMinInflateRatio);
+            }
+        }
+        template.render(map);
         try {
             template.writeAndClose(Files.newOutputStream(Paths.get(url)));
         } catch (IOException e) {

--
Gitblit v1.9.3