From a8296ef06369452e9151624b6ac4e7cb12a394e3 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期三, 21 一月 2026 16:06:18 +0800
Subject: [PATCH] 导入数据模板下载
---
fzzy-igdss-web/src/main/java/com/fzzy/common/manager/ExportManager.java | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/common/manager/ExportManager.java b/fzzy-igdss-web/src/main/java/com/fzzy/common/manager/ExportManager.java
index a348d5a..c1e523a 100644
--- a/fzzy-igdss-web/src/main/java/com/fzzy/common/manager/ExportManager.java
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/common/manager/ExportManager.java
@@ -52,7 +52,7 @@
}
//鑾峰彇妯℃澘璺緞
- String templatePath = fileService.getTemplateFilePath();
+ String templatePath = fileService.getFileSavePath("TEMPLATE");
File file = new File(templatePath + templateName);
if (!file.exists()) {
log.error("妯℃澘鏂囦欢涓嶅瓨鍦紝涓嶆墽琛屽鍑猴紒");
@@ -60,7 +60,7 @@
}
//鑾峰彇鏂囦欢淇濆瓨璺緞,浠ュ簱鍖哄垎寮�
- String savePath = fileService.getWordPath(null);
+ String savePath = fileService.getFileSavePath(null);
param.setTemplatePath(templatePath);
param.setTemplateName(templateName);
@@ -91,4 +91,23 @@
}
}
+ /**
+ * 娓叉煋妯℃澘淇濆瓨骞朵笅杞�
+ *
+ * @param response
+ */
+ public void downloadInoutExcel(HttpServletResponse response) {
+ try {
+
+ String savePath = fileService.getFileSavePath("TEMPLATE");
+ String templateName = "鍑哄叆搴撴暟鎹ā鏉�.xlsx";
+
+ //涓嬭浇鏂囨。
+ WordUtil.download(savePath, templateName, response);
+
+ } catch (Exception e) {
+ log.error("涓嬭浇鏂囦欢澶辫触", e);
+ }
+ }
+
}
--
Gitblit v1.9.3