管道基础大数据平台系统开发-【后端】-Server
3
13693261870
2023-01-09 28b8826749e910010e748a3bf085f8615ed628b6
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)) {