| | |
| | | */ |
| | | private void loadData(List<MetaFileEntity> list) { |
| | | for (MetaFileEntity mf : list) { |
| | | if (StringHelper.isEmpty(mf.getEntity())) { |
| | | continue; |
| | | } |
| | | if (StaticData.SHP.equals(mf.getExtName()) || StaticData.GDB.equals(mf.getExtName())) { |
| | | loadSpatialData(mf); |
| | | } |
| | |
| | | if (StaticData.SHP.equals(mf.getExtName())) { |
| | | list = ShpHelper.readData(clazz, mf.getPath()); |
| | | } else { |
| | | GdbHelper.readData(clazz, mf.getPath(), mf.getTab()); |
| | | list = GdbHelper.readData(clazz, mf.getPath(), mf.getTab()); |
| | | } |
| | | if (null == list || list.isEmpty()) { |
| | | return; |
| | |
| | | |
| | | File newFile = new File(targetPath); |
| | | if (newFile.exists()) { |
| | | mf.setMsg("文件已存在"); |
| | | file.delete(); |
| | | return 0; |
| | | } |
| | |
| | | |
| | | File newFile = new File(targetPath); |
| | | if (newFile.exists() && newFile.isDirectory()) { |
| | | mf.setMsg("文件已存在"); |
| | | FileHelper.deleteFiles(file); |
| | | return; |
| | | } |
| | |
| | | metas.add(createMeta(mf)); |
| | | } |
| | | } |
| | | if (metas.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | int rows = metaService.inserts(metas); |
| | | |