From 796b44ea813a1133beae4f3a67f1c0263510c0c7 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期日, 17 十一月 2024 09:45:07 +0800
Subject: [PATCH] 1

---
 src/main/java/com/moon/server/service/all/BaseUploadService.java |   83 -----------------------------------------
 1 files changed, 1 insertions(+), 82 deletions(-)

diff --git a/src/main/java/com/moon/server/service/all/BaseUploadService.java b/src/main/java/com/moon/server/service/all/BaseUploadService.java
index 958b26b..172aca6 100644
--- a/src/main/java/com/moon/server/service/all/BaseUploadService.java
+++ b/src/main/java/com/moon/server/service/all/BaseUploadService.java
@@ -21,11 +21,8 @@
 import java.sql.Timestamp;
 import java.util.*;
 
-/**
- * 鐖朵笂浼犳湇鍔�
- * @author WWW
- */
 @Service
+@SuppressWarnings("ALL")
 public class BaseUploadService {
     @Autowired
     protected DirService dirService;
@@ -35,16 +32,10 @@
 
     public final Log log = LogFactory.getLog(getClass());
 
-    /**
-     * 鏌ヨ鐩綍
-     */
     public String selectPath() {
         return pathHelper.getTempPathName();
     }
 
-    /**
-     * 涓婁紶鏂囦欢
-     */
     public <T> List<MetaFileEntity> uploadData(T t, String path, boolean isGetGuid, HttpServletRequest req, HttpServletResponse res) throws Exception {
         StandardMultipartHttpServletRequest request = (StandardMultipartHttpServletRequest) req;
         req.setCharacterEncoding("utf-8");
@@ -57,9 +48,6 @@
         return getFiles(path, isGetGuid, request);
     }
 
-    /**
-     * 璁剧疆瀹炰綋绫�
-     */
     private <T> void setEntity(T t, StandardMultipartHttpServletRequest req) {
         Enumeration<String> enumeration = req.getParameterNames();
         while (enumeration.hasMoreElements()) {
@@ -94,9 +82,6 @@
         }
     }
 
-    /**
-     * 鑾峰彇鏂囦欢
-     */
     public List<MetaFileEntity> getFiles(String subPath, boolean isGetGuid, StandardMultipartHttpServletRequest req) throws Exception {
         List<MetaFileEntity> list = new ArrayList<>();
 
@@ -126,9 +111,6 @@
         return list;
     }
 
-    /**
-     * 鏌ヨ鏂囦欢
-     */
     public List<MetaFileEntity> selectFiles(String subPath, boolean hasMd5) {
         String root = pathHelper.getConfig().getTempPath() + File.separator + subPath;
 
@@ -164,9 +146,6 @@
         return list;
     }
 
-    /**
-     * 鍒犻櫎鏂囦欢
-     */
     public Integer deleteFiles(List<MetaFileEntity> list) {
         String root = pathHelper.getConfig().getTempPath();
 
@@ -186,9 +165,6 @@
         return count;
     }
 
-    /**
-     * 鏌ヨ鏄犲皠
-     */
     public List<MetaFileEntity> selectMappers(UserEntity ue, String path, DirEntity dir, VerEntity ver) {
         List<MetaFileEntity> metas = selectFiles(path, true);
         if (null == metas || metas.isEmpty()) {
@@ -219,9 +195,6 @@
         return list;
     }
 
-    /**
-     * 鑾峰彇鏄犲皠鏂囦欢
-     */
     private List<MetaFileEntity> getMapperFiles(String path, DirEntity dir, List<DirEntity> dirs, MetaFileEntity meta) {
         String tempPath = pathHelper.getConfig().getTempPath();
         String zipFile = tempPath + File.separator + meta.getPath();
@@ -245,9 +218,6 @@
         return getMapperFiles(files, dir, dirs, meta, tempPath.length() + 1);
     }
 
-    /**
-     * 鏍规嵁璺緞鑾峰彇鏂囦欢
-     */
     private void getFilesByPath(List<File> list, String path) {
         File file = new File(path);
         if (!file.isDirectory()) {
@@ -277,9 +247,6 @@
         }
     }
 
-    /**
-     * 鏂囦欢鏄�/鍚︽湁鏁�
-     */
     private boolean isFileValid(String fileName) {
         String extName = FileHelper.getExtension(fileName);
         if (fileName.startsWith(StaticData.TILDE) || !StaticData.ALL_EXTENSION.contains(extName)) {
@@ -296,9 +263,6 @@
         return true;
     }
 
-    /**
-     * 鑾峰彇鏄犲皠鏂囦欢
-     */
     private List<MetaFileEntity> getMapperFiles(List<File> files, DirEntity dir, List<DirEntity> dirs, MetaFileEntity meta, int start) {
         List<MetaFileEntity> list = new ArrayList<>();
         for (File f : files) {
@@ -337,9 +301,6 @@
         return list;
     }
 
-    /**
-     * 鍒涘缓鍏冩暟鎹枃浠跺疄浣撶被
-     */
     private MetaFileEntity createMetaFileEntity(File f, MetaFileEntity meta, String fileName, String extName) {
         boolean isShp = StaticData.SHP.equals(extName);
 
@@ -361,9 +322,6 @@
         return mf;
     }
 
-    /**
-     * 鍒涘缓鍏冩暟鎹枃浠跺疄浣撶被
-     */
     private MetaFileEntity createMetaFileEntity(MetaFileEntity meta) {
         MetaFileEntity mf = new MetaFileEntity();
         mf.setDircode(meta.getDircode());
@@ -375,9 +333,6 @@
         return mf;
     }
 
-    /**
-     * 鏍规嵁鏂囦欢璺緞鑾峰彇鐩綍ID
-     */
     private String getDirByPath(String filePath,String fileName, DirEntity dir, List<DirEntity> dirs) {
         if (0 != dir.getPid() || null == dirs || dirs.isEmpty()) {
             return dir.getCode();
@@ -397,9 +352,6 @@
         return dir.getCode();
     }
 
-    /**
-     * 鑾峰彇SHP鏂囦欢闆嗗悎
-     */
     private List<String> getShpFiles(String shpPath) {
         List<String> list = new ArrayList<>();
         list.add(shpPath);
@@ -416,9 +368,6 @@
         return list;
     }
 
-    /**
-     * 鑾峰彇GDB鏂囦欢闆嗗悎
-     */
     private List<String> getGdbFiles(String path) {
         List<String> list = new ArrayList<>();
 
@@ -433,9 +382,6 @@
         return list;
     }
 
-    /**
-     * 鑾峰彇澶氭枃浠剁殑MD5
-     */
     private String getFilesMd5(List<String> files) {
         List<String> list = new ArrayList<>();
         for (String file : files) {
@@ -453,9 +399,6 @@
         return StringHelper.getGuid();
     }
 
-    /**
-     * 鑾峰彇澶氭枃浠剁殑澶у皬
-     */
     private double getFilesSize(List<String> files) {
         long size = 0L;
         for (String file : files) {
@@ -468,9 +411,6 @@
         return FileHelper.sizeToMb(size);
     }
 
-    /**
-     * 鑾峰彇GDB鏂囦欢鏄犲皠
-     */
     private List<MetaFileEntity> getGdbMappers(File f, MetaFileEntity meta, String dircode, int start) {
         List<String> tabs = GdbHelper.getTabNames(f.getPath());
         if (null == tabs || tabs.size() == 0) {
@@ -502,9 +442,6 @@
         return list;
     }
 
-    /**
-     * 鏄�/鍚︿负GDB鏂囦欢
-     */
     private boolean isGdbFile(File f) {
         if (f.isDirectory() && f.getName().toLowerCase().endsWith(StaticData.GDB)) {
             File gdb = new File(f.getPath() + File.separator + "gdb");
@@ -515,9 +452,6 @@
         return false;
     }
 
-    /**
-     * 璁剧疆鍏冩暟鎹枃浠剁殑绫诲瀷
-     */
     private void setMetaType(List<MetaFileEntity> list) {
         for (MetaFileEntity mf : list) {
             if (null != mf.getExtName()) {
@@ -526,9 +460,6 @@
         }
     }
 
-    /**
-     * 澶勭悊鐩綍
-     */
     public void copePath(List<MetaFileEntity> list) {
         String basePath = pathHelper.getConfig().getTempPath() + File.separator;
         for (MetaFileEntity mf : list) {
@@ -536,9 +467,6 @@
         }
     }
 
-    /**
-     * 鏄�/鍚︿负OSGB鏂囦欢
-     */
     private boolean isOsgbFile(File f) {
         if (f.isDirectory()) {
             File meta = new File(f.getPath() + File.separator + "metadata.xml");
@@ -550,10 +478,6 @@
         return false;
     }
 
-
-    /**
-     * 鑾峰彇OSGB鏂囦欢鏄犲皠
-     */
     private MetaFileEntity getOsgbMapper(File f,  MetaFileEntity meta, String dircode, int start) {
         String fileName = FileHelper.getFileName(f.getPath());
 
@@ -576,11 +500,6 @@
         return mf;
     }
 
-    /**
-     * 鑾峰彇鍙傛暟 *
-     * Enumeration<String> headers = req.getHeaderNames();
-     * Enumeration<String> attributes = req.getAttributeNames();
-     */
     public Map<String, String> getParams(StandardMultipartHttpServletRequest req) {
         Map<String, String> map = new HashMap<>(3);
 

--
Gitblit v1.9.3