From 0c8d20900c14651cb50180ade4ccd0e2074796b4 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期三, 07 一月 2026 18:38:01 +0800
Subject: [PATCH] 质押监管接口解析

---
 fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java |  117 ++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 73 insertions(+), 44 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 7ed02f2..5c3c073 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
@@ -3,6 +3,7 @@
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.fzzy.igds.domain.FileInfo;
 import com.fzzy.igds.mapper.FileMapper;
+import com.fzzy.igds.utils.Base64Util;
 import com.fzzy.igds.utils.ContextUtil;
 import com.ruoyi.common.config.FrameworkConfig;
 import org.apache.commons.lang3.time.DateFormatUtils;
@@ -98,15 +99,7 @@
     }
 
     /**
-     *
-     * @param id
-     */
-    public void delFile(String id) {
-        fileMapper.deleteById(id);
-    }
-
-    /**
-     * 鑾峰彇鍑哄叆搴撴枃浠惰矾寰�
+     * 鏍规嵁绫诲瀷鑾峰彇鏂囦欢璺緞
      * @param pathTag
      * @return
      */
@@ -114,19 +107,51 @@
         if(StringUtils.isBlank(pathTag)){
             pathTag = "COMMON";
         }
+        if("EVENT".equals(pathTag)) return getEventFilePath();
+        if("SNAP".equals(pathTag)) return getSnapFilePath();
         if("INOUT".equals(pathTag)) return getInoutFilePath();
         if("PATROL".equals(pathTag)) return getPatrolFilePath();
         if("DEPT".equals(pathTag)) return getDeptFilePath();
+        if("TEMP".equals(pathTag)) return getTempFilePath();
+        if("CONF".equals(pathTag)) return getConfPath();
+        if("TEMPLATE".equals(pathTag)) return getTemplateFilePath();
+        if("WORD".equals(pathTag)) return getWordPath();
 
         return getCommonFilePath();
     }
 
     /**
-     * 鑾峰彇鍑哄叆搴撴枃浠惰矾寰�
+     * 鑾峰彇浜嬩欢鏂囦欢璺緞
+     * @return
+     */
+    public String getEventFilePath() {
+        String basePath = FrameworkConfig.getProfile() + "EVENT/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
+        File file = new File(basePath);
+        if (!file.exists()) {
+            file.mkdirs();
+        }
+        return basePath;
+    }
+
+    /**
+     * 鑾峰彇鎶撴媿鏂囦欢璺緞
+     * @return
+     */
+    public String getSnapFilePath() {
+        String basePath = FrameworkConfig.getProfile() + "SNAP/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
+        File file = new File(basePath);
+        if (!file.exists()) {
+            file.mkdirs();
+        }
+        return basePath;
+    }
+
+    /**
+     * 鑾峰彇宸℃鏂囦欢璺緞
      * @return
      */
     public String getPatrolFilePath() {
-        String basePath = FrameworkConfig.getProfile() + "INOUT/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
+        String basePath = FrameworkConfig.getProfile() + "PATROL/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
         File file = new File(basePath);
         if (!file.exists()) {
             file.mkdirs();
@@ -179,15 +204,11 @@
 
     /**
      * 鑾峰彇涓存椂璺緞
-     * @param companyId
      * @return
      */
-    public String getTempFilePath(String companyId) {
+    public String getTempFilePath() {
 
         String basePath = FrameworkConfig.getProfile() + "TEMP/";
-        if (org.apache.commons.lang3.StringUtils.isNotEmpty(companyId)) {
-            basePath += companyId + "/";
-        }
         File file = new File(basePath);
         if (!file.exists()) {
             file.mkdirs();
@@ -207,6 +228,42 @@
             file.mkdirs();
         }
         return basePath;
+    }
+
+    /**
+     * 鑾峰彇妯℃澘璺緞锛氭墍鏈夋ā鏉跨粺涓�鏀惧湪TEMPLATE/鐩綍涓�
+     * @return
+     */
+    public String getTemplateFilePath() {
+        String basePath = FrameworkConfig.getProfile() + "TEMPLATE/";
+        File file = new File(basePath);
+        if (!file.exists()) {
+            file.mkdirs();
+        }
+        return basePath;
+    }
+
+    /**
+     * 鑾峰彇word璺緞
+     * @return
+     */
+    public String getWordPath() {
+
+        String basePath = FrameworkConfig.getProfile()  + "WORD/";
+        File file = new File(basePath);
+        if (!file.exists()) {
+            file.mkdirs();
+        }
+        return basePath;
+    }
+
+    /**
+     * base64杞浘鐗囦繚瀛�
+     * @param filePath
+     * @param imgData
+     */
+    public void baseImg2Disk(String filePath, String imgData) {
+        Base64Util.generateImage(imgData, filePath);
     }
 
     /**
@@ -252,33 +309,5 @@
         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