|
|
@@ -392,6 +392,54 @@ public class SpatialFilesDbServiceImpl implements ISpatialFilesDbService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public TGeomDb excelImportGeom(List<String> gdIdList){
|
|
|
+ String tDbId = IdUtils.fastSimpleUUID();
|
|
|
+ Long sort = 0L;
|
|
|
+ if(!gdIdList.isEmpty()) {
|
|
|
+ List<Map<String, Object>> gdDataList = tGeomDbDetailsMapper.selectTableDataAndGeomById(gdIdList, "gj_gd_data");
|
|
|
+ for (Map<String, Object> gdData : gdDataList) {
|
|
|
+ String shpGeom = (String) gdData.get("geom2");
|
|
|
+ TGeomDbDetails detailsDTO = new TGeomDbDetails();
|
|
|
+ detailsDTO.setShpDbSRID(shpDbSRID);
|
|
|
+ detailsDTO.setShpAreaSRID(shpAreaSRID);
|
|
|
+ detailsDTO.setShpOutSRID(shpOutSRID);
|
|
|
+ detailsDTO.setShpAreaGeography(shpAreaGeography);
|
|
|
+ detailsDTO.setId(IdUtils.fastSimpleUUID());
|
|
|
+ detailsDTO.setUploadId(tDbId);
|
|
|
+ // 直接获取geom
|
|
|
+ detailsDTO.setGeom(shpGeom);
|
|
|
+ detailsDTO.setSort(sort);
|
|
|
+ //这里如何获取其他属性
|
|
|
+ //detailsDTO.setGeomJson(JSON.toJSONString(shpFeatures));
|
|
|
+ detailsDTO.setGeomJson("{\"id\":\"" + detailsDTO.getId() + "\"}");
|
|
|
+ itGeomDbDetailsService.insertTGeomDbDetails(detailsDTO);
|
|
|
+ sort++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ TGeomDb dto = new TGeomDb();
|
|
|
+ dto.setId(tDbId);
|
|
|
+ dto.setName("gj_gd_data");
|
|
|
+ dto.setShppath("0");
|
|
|
+ dto.setFiletype("4");
|
|
|
+ dto.setFromroute("excel");
|
|
|
+
|
|
|
+ TGeomDb retDto = itGeomDbDetailsService.sumGeomDetailsByUploadId(tDbId);
|
|
|
+ dto.setGeom(retDto.getGeom());
|
|
|
+ dto.setGeomNumber(retDto.getGeomNumber());
|
|
|
+ dto.setGeomArea(retDto.getGeomArea());
|
|
|
+ dto.setShpDbSRID(shpDbSRID);
|
|
|
+ dto.setShpAreaSRID(shpAreaSRID);
|
|
|
+ dto.setShpOutSRID(shpOutSRID);
|
|
|
+ dto.setShpAreaGeography(shpAreaGeography);
|
|
|
+ itGeomDbService.insertTGeomDb(dto);
|
|
|
+ return dto;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//todo 这里文件上传获取矢量处理
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|