From 28b8826749e910010e748a3bf085f8615ed628b6 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 09 一月 2023 15:42:23 +0800 Subject: [PATCH] 3 --- src/main/java/com/lf/server/service/all/BaseUploadService.java | 43 ++++++++----------------------------------- 1 files changed, 8 insertions(+), 35 deletions(-) diff --git a/src/main/java/com/lf/server/service/all/BaseUploadService.java b/src/main/java/com/lf/server/service/all/BaseUploadService.java index a6ce5ae..f0a614d 100644 --- a/src/main/java/com/lf/server/service/all/BaseUploadService.java +++ b/src/main/java/com/lf/server/service/all/BaseUploadService.java @@ -1,6 +1,6 @@ package com.lf.server.service.all; -import com.lf.server.entity.ctrl.TabMapperEntity; +import com.lf.server.entity.data.DirEntity; import com.lf.server.entity.data.MetaFileEntity; import com.lf.server.helper.*; import org.apache.commons.logging.Log; @@ -190,31 +190,16 @@ /** * 鏌ヨ鏄犲皠 */ - public List<TabMapperEntity> selectMappers(String subPath) { - String root = pathHelper.getConfig().getTempPath() + File.separator + subPath; - - File file = new File(root); - if (!file.exists() && !file.isDirectory()) { - return null; + public List<MetaFileEntity> selectMappers(List<MetaFileEntity> metas, DirEntity dir, String epsgCode) { + List<MetaFileEntity> list = new ArrayList<>(); + for (MetaFileEntity meta : metas) { + // } - File[] files = file.listFiles(); - if (null == files || files.length == 0) { - return null; - } - - File zipFile = new File(root + "_zip"); - if (!zipFile.exists() || !zipFile.isDirectory()) { - zipFile.mkdirs(); - } - - return getMappers(zipFile.getPath(), files); + return list; } - /** - * 鑾峰彇鏄犲皠 - */ - private List<TabMapperEntity> getMappers(String zipPath, File[] files) { + /*private List<TabMapperEntity> getMappers(String zipPath, File[] files) { String temp = pathHelper.getConfig().getTempPath(); List<TabMapperEntity> list = new ArrayList<>(); @@ -253,9 +238,6 @@ return list; } - /** - * 鑾峰彇Shp鏂囦欢 - */ private void getShpFiles(String sourceName, String subPath, List<TabMapperEntity> list) { List<String> files = new ArrayList<>(); getShpFiles(subPath, files); @@ -268,9 +250,6 @@ } } - /** - * 鑾峰彇Shp鏂囦欢 - */ private void getShpFiles(String shpPath, List<String> list) { File file = new File(shpPath); @@ -291,9 +270,6 @@ } } - /** - * 鑾峰彇Gdb鏂囦欢 - */ private void getGdbFiles(String sourceName, String subPath, List<TabMapperEntity> list) { List<String> files = new ArrayList<>(); getGdbFiles(subPath, files); @@ -308,9 +284,6 @@ } } - /** - * 鑾峰彇Gdb鏂囦欢 - */ private void getGdbFiles(String shpPath, List<String> list) { File file = new File(shpPath); @@ -331,7 +304,7 @@ getGdbFiles(f.getPath(), list); } - } + }*/ private boolean isGdbFile(File f) { if (f.getName().toLowerCase().endsWith(GDB)) { -- Gitblit v1.9.3