| | |
| | | * 获取映射 |
| | | */ |
| | | private List<TabMapperEntity> getMappers(String zipPath, File[] files) { |
| | | String temp = pathHelper.getConfig().getTempPath(); |
| | | |
| | | List<TabMapperEntity> list = new ArrayList<>(); |
| | | for (File f : files) { |
| | | String fileName = FileHelper.getFileName(f.getPath()); |
| | | if (fileName.contains(XLS)) { |
| | | list.add(new TabMapperEntity(fileName, "xls", null, fileName)); |
| | | String path = f.getPath().replace(temp + File.separator, ""); |
| | | list.add(new TabMapperEntity(fileName, "xls", null, path)); |
| | | continue; |
| | | } |
| | | if (fileName.contains(MDB)) { |
| | | String path = f.getPath().replace(temp + File.separator, ""); |
| | | List<String> tabs = MdbHelper.getTabNames(f.getPath()); |
| | | for (String tab : tabs) { |
| | | list.add(new TabMapperEntity(fileName, "mdb", tab, fileName)); |
| | | list.add(new TabMapperEntity(fileName, "mdb", tab, path)); |
| | | } |
| | | continue; |
| | | } |
| | |
| | | case "shp": |
| | | case "gdb": |
| | | case "mdb": |
| | | String zipPath = FileHelper.getPath(temp + File.separator + mf.getPath()) + "_zip"; |
| | | insertDb(me.getType(), zipPath, mfe, tabs); |
| | | insertDb(me.getType(), temp, mfe, tabs); |
| | | break; |
| | | default: |
| | | break; |