From 32bdae73e49c51b6835ef0a5c7b82c4a83a521df Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期日, 16 三月 2025 16:46:08 +0800
Subject: [PATCH] 人事系统对接

---
 inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 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 7d61ac8..17e3cea 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
@@ -22,11 +22,12 @@
 import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper;
 import com.ruoyi.basic.pojo.IfsInventoryQuantity;
 import com.ruoyi.common.constant.InsOrderTypeConstants;
+import com.ruoyi.common.constant.MenuJumpPathConstants;
 import com.ruoyi.common.core.domain.Result;
 import com.ruoyi.common.core.domain.entity.InformationNotification;
-import com.ruoyi.common.core.domain.entity.User;
-import com.ruoyi.common.properties.WechatProperty;
+import com.ruoyi.common.config.WechatProperty;
 import com.ruoyi.common.utils.*;
+import com.ruoyi.common.utils.api.IfsApiUtils;
 import com.ruoyi.framework.exception.ErrorException;
 import com.ruoyi.inspect.dto.ReportPageDto;
 import com.ruoyi.inspect.mapper.*;
@@ -39,6 +40,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 +85,7 @@
     private String wordUrl;
     @Value("${file.path}")
     private String imgUrl;
-    @Value("${file.licenseUrl}")
-    private String licenseUrl;
+
     @Resource
     private InsOrderMapper insOrderMapper;
     @Resource
@@ -187,7 +188,7 @@
         info.setSenderId(submitUserId);    //鍙戦�佷汉
         info.setConsigneeId(userId);     //鏀朵欢浜�
         info.setViewStatus(false);
-        info.setJumpPath("b1-report-preparation");
+        info.setJumpPath(MenuJumpPathConstants.REPORT_PREPARATION);
         informationNotificationService.addInformationNotification(info);
         //绯荤粺鐢熸垚鎶ュ憡鍦板潃
         String url = insReport.getUrl();
@@ -308,7 +309,7 @@
         info.setSenderId(checkUserId);    //鍙戦�佷汉
         info.setConsigneeId(userId);     //鏀朵欢浜�
         info.setViewStatus(false);
-        info.setJumpPath("b1-report-preparation");
+        info.setJumpPath(MenuJumpPathConstants.REPORT_PREPARATION);
         informationNotificationService.addInformationNotification(info);
         //绯荤粺鐢熸垚鎶ュ憡鍦板潃
         String url = insReport.getUrl();
@@ -537,6 +538,11 @@
             }
             // 鍘嬬缉涓存椂鏂囦欢澶�
             zipFilePath = wordUrl + "/zip/output.zip";
+            // 鍒ゆ柇zip璺緞鏄惁瀛樺湪
+            File zipDir = new File(wordUrl + "/zip");
+            if(!zipDir.isDirectory()){
+                zipDir.mkdirs();
+            }
             zipDirectory(tempFolderPath, zipFilePath);
 
             // 娓呯悊涓存椂鏂囦欢澶�
@@ -676,7 +682,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 +1121,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()) {

--
Gitblit v1.9.3