| | |
| | | import com.lf.server.entity.ctrl.TabMapperEntity; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.helper.ClassHelper; |
| | | import com.lf.server.helper.ExcelHelper; |
| | | import com.lf.server.helper.FileHelper; |
| | | import com.lf.server.helper.ZipHelper; |
| | | import com.lf.server.helper.*; |
| | | import com.lf.server.mapper.all.GeomBaseMapper; |
| | | import com.lf.server.service.all.BaseQueryService; |
| | | import com.lf.server.service.all.BaseUploadService; |
| | |
| | | continue; |
| | | } |
| | | if (fileName.contains(MDB)) { |
| | | list.add(new TabMapperEntity(fileName, "mdb", fileName)); |
| | | //list.add(new TabMapperEntity(fileName, "mdb", fileName)); |
| | | List<String> tabs = GdbHelper.getTabNames(f.getPath()); |
| | | for (String tab : tabs) { |
| | | list.add(new TabMapperEntity(fileName, "mdb", tab, fileName)); |
| | | } |
| | | continue; |
| | | } |
| | | if (fileName.contains(SHP_ZIP)) { |
| | |
| | | getGdbFiles(f.getName(), subPath, list); |
| | | continue; |
| | | } |
| | | if (!fileName.contains(ZIP)){ |
| | | if (!fileName.contains(ZIP)) { |
| | | // |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 获取Gdb文件 |
| | | */ |
| | | private void getGdbFiles(String sourceName, String subPath, List<TabMapperEntity> list){ |
| | | private void getGdbFiles(String sourceName, String subPath, List<TabMapperEntity> list) { |
| | | List<String> files = new ArrayList<>(); |
| | | getGdbFiles(subPath, files); |
| | | |
| | | String root = subPath.substring(0, subPath.lastIndexOf(File.separator) + 1); |
| | | for (String file : files) { |
| | | String name = FileHelper.getFileName(file); |
| | | String path = file.replace(root, ""); |
| | | list.add(new TabMapperEntity(sourceName, "shp", name, path)); |
| | | List<String> tabs = GdbHelper.getTabNames(file); |
| | | for (String tab : tabs) { |
| | | list.add(new TabMapperEntity(sourceName, "gdb", tab, path)); |
| | | } |
| | | } |
| | | } |
| | | |