| | |
| | | /** |
| | | * 查询映射 |
| | | */ |
| | | public List<MetaFileEntity> selectMappers(UserEntity ue, List<MetaFileEntity> metas, DirEntity dir, VerEntity ver, String epsgCode) { |
| | | public List<MetaFileEntity> selectMappers(UserEntity ue, String path, DirEntity dir, VerEntity ver, String epsgCode) { |
| | | List<MetaFileEntity> metas = selectFiles(path, StaticData.ALL_EXTENSION); |
| | | if (null == metas || metas.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | List<MetaFileEntity> list = new ArrayList<>(); |
| | | for (MetaFileEntity meta : metas) { |
| | | meta.setDirid(dir.getId()); |
| | |
| | | meta.setEpsgCode(epsgCode); |
| | | |
| | | if (StaticData.ZIP.equals(meta.getExtName())) { |
| | | List<MetaFileEntity> subs = getMappers(meta.getPath(), meta); |
| | | if (subs.size() > 0) { |
| | | List<MetaFileEntity> subs = getMappers(path, meta.getPath(), meta); |
| | | if (null != subs && subs.size() > 0) { |
| | | list.addAll(subs); |
| | | continue; |
| | | } |
| | | } else { |
| | | meta.setEventid(StringHelper.getGuid()); |
| | | list.add(meta); |
| | | } |
| | | |
| | | meta.setEventid(StringHelper.getGuid()); |
| | | list.add(meta); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | private List<MetaFileEntity> getMappers(String zipPath, MetaFileEntity meta) { |
| | | /** |
| | | * 获取映射 |
| | | */ |
| | | private List<MetaFileEntity> getMappers(String path, String zipPath, MetaFileEntity meta) { |
| | | File file = new File(pathHelper.getConfig().getTempPath() + File.separator + zipPath); |
| | | if (!file.exists() || file.isDirectory()) { |
| | | return null; |
| | | } |
| | | |
| | | File zipFolder = new File(pathHelper.getConfig().getTempPath() + File.separator + path + "_zip"); |
| | | if (!zipFolder.exists() || !zipFolder.isDirectory()) { |
| | | zipFolder.mkdirs(); |
| | | } |
| | | |
| | | List<MetaFileEntity> list = new ArrayList<>(); |
| | | |
| | | |