| | |
| | | */ |
| | | private void insertXls(String root, MetaFileEntity mfe, List<TabMapperEntity> tabs) { |
| | | TabMapperEntity tab = getTabEntity(mfe, tabs); |
| | | if (null == tab|| StringHelper.isEmpty(tab.getEntity())) { |
| | | if (null == tab || StringHelper.isEmpty(tab.getEntity())) { |
| | | return; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | List<?> list = ExcelHelper.readExcel(clazz, root + File.separator + mfe.getPath()); |
| | | if (null == list || list.isEmpty()) { |
| | | if (list.isEmpty()) { |
| | | return; |
| | | } |
| | | setCreateInfo(list, mfe); |
| | |
| | | rows += basicMapper.insert(list.get(i)); |
| | | } |
| | | if (basicMapper instanceof GeomBaseMapper) { |
| | | GeomBaseMapper geomBaseMapper = (GeomBaseMapper) basicMapper; |
| | | updateXlsGeom(geomBaseMapper, list); |
| | | updateXlsGeom((GeomBaseMapper) basicMapper, list); |
| | | } |
| | | |
| | | tab.setRows(rows); |
| | |
| | | } |
| | | |
| | | List<?> list = ShpHelper.readData(clazz, root + File.separator + tab.getSubPath()); |
| | | if (null == list || list.isEmpty()) { |
| | | if (list.isEmpty()) { |
| | | continue; |
| | | } |
| | | setCreateInfo(list, mfe); |
| | | |
| | | Integer rows = basicMapper.insertBatch(list); |
| | | if (basicMapper instanceof GeomBaseMapper) { |
| | | GeomBaseMapper geomBaseMapper = (GeomBaseMapper) basicMapper; |
| | | updateXlsGeom(geomBaseMapper, list); |
| | | updateDbGeom((GeomBaseMapper) basicMapper, list); |
| | | } |
| | | |
| | | tab.setRows(rows); |