From 2fcf73e5783a7a06dd4d4e6f412b9f759a7230c1 Mon Sep 17 00:00:00 2001
From: jiazx0107 <jiazx0107@163.com>
Date: 星期一, 05 一月 2026 21:22:06 +0800
Subject: [PATCH] 调整出入库配置
---
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java
index c6c9507..7ed02f2 100644
--- a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java
@@ -233,6 +233,52 @@
ImageIO.write(compressedImage, "jpg", new File(outputPath));
}
+ /**
+ * 鍒ゆ柇璺緞涓嬫枃浠舵槸鍚﹀瓨鍦紝涓嶅瓨鍦ㄥ垯缁欓粯璁�
+ * @param imgPath
+ * @return
+ */
+ public String isImgExit(String imgPath, String tag) {
+ String path = "/img/img-fail.jpg";
+ if(StringUtils.isNotBlank(tag) && "dept".equals(tag)){
+ path = "/img/deptImg.jpg";
+ }
+ if(StringUtils.isNotBlank(imgPath)){
+ File file = new File(imgPath.replace("/profile", FrameworkConfig.getProfile()));
+ if(file.exists()){
+ path = imgPath;
+ }
+ }
+ return path;
+ }
+ /**
+ * 鑾峰彇妯℃澘璺緞锛氭墍鏈夋ā鏉跨粺涓�鏀惧湪TEMPLATE/鐩綍涓�
+ * @return
+ */
+ public String getTemplateFilePath() {
+ String basePath = FrameworkConfig.getProfile() + "TEMPLATE/";
+ File file = new File(basePath);
+ if (!file.exists()) {
+ file.mkdirs();
+ }
+ return basePath;
+ }
+ /**
+ * 鑾峰彇word璺緞
+ * @param deptId
+ * @return
+ */
+ public String getWordPath(String deptId) {
+ if(StringUtils.isBlank(deptId)){
+ deptId = "0000";
+ }
+ String basePath = FrameworkConfig.getProfile() + deptId + "/WORD/";
+ File file = new File(basePath);
+ if (!file.exists()) {
+ file.mkdirs();
+ }
+ return basePath;
+ }
}
--
Gitblit v1.9.3