From 0f0cf4da61abdae52371420474bf0ebabc917f60 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期一, 09 三月 2026 10:05:36 +0800
Subject: [PATCH] 报表,搜索时间展示修改

---
 fzzy-igdss-view/src/main/java/com/fzzy/igds/FileUploadManage.java |   47 ++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/FileUploadManage.java b/fzzy-igdss-view/src/main/java/com/fzzy/igds/FileUploadManage.java
index 8066365..388a252 100644
--- a/fzzy-igdss-view/src/main/java/com/fzzy/igds/FileUploadManage.java
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/FileUploadManage.java
@@ -4,6 +4,7 @@
 import com.bstek.dorado.uploader.annotation.FileResolver;
 import com.fzzy.igds.service.FileService;
 import com.fzzy.igds.utils.ContextUtil;
+import com.ruoyi.common.config.FrameworkConfig;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.time.DateFormatUtils;
@@ -13,7 +14,6 @@
 import java.io.IOException;
 import java.util.Date;
 import java.util.Map;
-
 
 /**
  * @Description Dorado7 闄勪欢涓婁紶鍏叡绠$悊灞�
@@ -38,16 +38,22 @@
 	@FileResolver
 	public String imgFile(UploadFile file, Map<String, Object> parameter) {
 
-		String fileId = null;
+		String filePath = null;
 		try {
 
 			String basePath = fileService.getFileSavePath("DEPT");
 
-			fileId = "aerial-" + ContextUtil.subDeptId(null)
+			//鏂版枃浠跺悕
+			String fileId = "aerial-" + ContextUtil.subDeptId(null)
 					+ file.getFileName().substring(
 					file.getFileName().lastIndexOf("."));
+			//鏂囦欢鍏ㄨ矾寰�
+			filePath = basePath + fileId;
+			//淇濆瓨
+			file.transferTo(new File(filePath));
 
-			file.transferTo(new File(basePath + fileId));
+			//鏇挎崲鍚庢枃浠跺叏璺緞
+			filePath = filePath.replace(FrameworkConfig.getProfile(), "/profile/");
 
 		} catch (IllegalStateException e) {
 			e.printStackTrace();
@@ -55,7 +61,7 @@
 			e.printStackTrace();
 		}
 
-		return fileId;
+		return filePath;
 	}
 
 	/**
@@ -91,4 +97,35 @@
 		return newFileName;
 	}
 
+	/**
+	 * 涓婁紶鍑哄叆搴撳鍏xcel妯℃澘
+	 * fileUploadManage#uploadExcel
+	 * @param file
+	 * @param parameter
+	 * @return
+	 */
+	@FileResolver
+	public String uploadExcel(UploadFile file, Map<String, Object> parameter) {
+		String newFileName = null;
+		try {
+			String basePath = fileService.getFileSavePath("TEMP");
+
+			newFileName = DateFormatUtils.format(new Date(), "yyyyMMddHHmmss");
+			newFileName = "EXCEL" + "_" + newFileName;
+
+			// 鏂囦欢鍚庣紑鍚�
+			String suffixName = file.getFileName().substring(file.getFileName().lastIndexOf("."));
+
+			// 鍚堟垚鏂扮殑鏂囦欢鍚�
+			newFileName = newFileName + suffixName;
+			file.transferTo(new File(basePath + newFileName));
+
+		} catch (IllegalStateException e) {
+			e.printStackTrace();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+
+		return newFileName;
+	}
 }

--
Gitblit v1.9.3