From cbee22eb13262742e2c3dd4c2746cf2f8a4cf96b Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期三, 12 三月 2025 13:29:25 +0800
Subject: [PATCH] 修改列表排序
---
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java | 13 +++++++++----
1 files changed, 9 insertions(+), 4 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..3bff4d3 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
@@ -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()) {
--
Gitblit v1.9.3