|
@@ -89,15 +89,20 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
|
|
|
QueryWrapper<TableLayerDTO> queryTableLayerPidWrapper = new QueryWrapper<>();
|
|
|
queryTableLayerPidWrapper.eq("pid", queryTableLayerDTO.getId());
|
|
|
List<TableLayerDTO> TableLayerDTOPid = tableLayerMapper.selectList(queryTableLayerPidWrapper);
|
|
|
+
|
|
|
+
|
|
|
if (TableLayerDTOPid == null || TableLayerDTOPid.size() == 0) {
|
|
|
+ List<List<TableDataVo>> retListData = new ArrayList<>();
|
|
|
//判断查询节点和源数据节点是否一致,一致代表查询当前节点详情
|
|
|
if (fromTableLayerDTO.getId().equals(queryTableLayerDTO.getId())) {
|
|
|
List<List<TableDataVo>> ret = queryIntersectsList(sourcePointWkt, queryTableId);
|
|
|
if (ret != null && ret.size() > 0) {
|
|
|
retMapData.put("base", null);
|
|
|
- retMapData.put("datalist", insetDataHandleGroup(ret, queryTableLayerDTO.getGroupcolumn(), uid));
|
|
|
+ insetDataHandleGroup(ret, queryTableLayerDTO.getGroupcolumn(), uid);
|
|
|
}
|
|
|
- retMapData.put("data", ret);
|
|
|
+ retListData.addAll(ret);
|
|
|
+ retMapData.put("data", retListData);
|
|
|
+ retMapData.put("datalist", tableLayerJgTempMapper.queryTableLayerJgTempList(uid));
|
|
|
} else {
|
|
|
//判断查询节点和源数据节点是否一致,不一致先查询原始节点图层,之后根据图层信息,查询要查询图层的数据
|
|
|
List<Map> retListMap = queryIntersectsByPoint(sourcePointWkt, fromTableLayerDTO.getTableId());
|
|
@@ -107,25 +112,63 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
|
|
|
List<List<TableDataVo>> ret = queryIntersectionList(geom, queryTableLayerDTO.getTableId());
|
|
|
if (ret != null && ret.size() > 0) {
|
|
|
retMapData.put("base", null);
|
|
|
- retMapData.put("datalist", insetDataHandleGroup(ret, queryTableLayerDTO.getGroupcolumn(), uid));
|
|
|
+ insetDataHandleGroup(ret, queryTableLayerDTO.getGroupcolumn(), uid);
|
|
|
}
|
|
|
- retMapData.put("data", ret);
|
|
|
+ retListData.addAll(ret);
|
|
|
}
|
|
|
}
|
|
|
+ retMapData.put("data", retListData);
|
|
|
+ retMapData.put("datalist", tableLayerJgTempMapper.queryTableLayerJgTempList(uid));
|
|
|
}
|
|
|
} else {
|
|
|
-
|
|
|
+ //判断查询节点和源数据节点是否一致,一致代表查询当前节点详情
|
|
|
+ if (fromTableLayerDTO.getId().equals(queryTableLayerDTO.getId())) {
|
|
|
+// List<List<TableDataVo>> ret = queryIntersectsList(sourcePointWkt, queryTableId);
|
|
|
+// if (ret != null && ret.size() > 0) {
|
|
|
+// retMapData.put("base", null);
|
|
|
+// retMapData.put("datalist", insetDataHandleGroup(ret, queryTableLayerDTO.getGroupcolumn(), uid));
|
|
|
+// }
|
|
|
+// retMapData.put("data", ret);
|
|
|
+ } else {
|
|
|
+ //判断查询节点和源数据节点是否一致,不一致先查询原始节点图层,之后根据图层信息,查询要查询图层的数据
|
|
|
+ List<Map> retListMap = queryIntersectsByPoint(sourcePointWkt, fromTableLayerDTO.getTableId());
|
|
|
+ if (retListMap != null && retListMap.size() > 0) {
|
|
|
+ List child = new ArrayList();
|
|
|
+ for (TableLayerDTO layerDTO : TableLayerDTOPid) {
|
|
|
+ String v_uid = StringUtils.getUUID();
|
|
|
+ List<List<TableDataVo>> retListData = new ArrayList<>();
|
|
|
+ Map<String, Object> v_d01 = new HashMap<>();
|
|
|
+ v_d01.put("base", "无数据");
|
|
|
+ for (Map mapData : retListMap) {
|
|
|
+ String geom = (String) mapData.get("geom");
|
|
|
+
|
|
|
+ List<List<TableDataVo>> ret = queryIntersectionList(geom, layerDTO.getTableId());
|
|
|
+ if (ret != null && ret.size() > 0) {
|
|
|
+ retMapData.put("base", null);
|
|
|
+ v_d01.put("base", null);
|
|
|
+ insetDataHandleGroup(ret, layerDTO.getGroupcolumn(), v_uid);
|
|
|
+ retListData.addAll(ret);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ v_d01.put("dataname", layerDTO.getName());
|
|
|
+ v_d01.put("data", retListData);
|
|
|
+ v_d01.put("datalist", tableLayerJgTempMapper.queryTableLayerJgTempList(v_uid));
|
|
|
+ child.add(v_d01);
|
|
|
+ }
|
|
|
+ retMapData.put("child", child);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return retMapData;
|
|
|
}
|
|
|
|
|
|
- private List<Map> insetDataHandleGroup(List<List<TableDataVo>> tableData, String groupColumn, String uid) {
|
|
|
+ private void insetDataHandleGroup(List<List<TableDataVo>> tableData, String groupColumn, String uid) {
|
|
|
if (StringUtils.isEmpty(groupColumn)) {
|
|
|
- return null;
|
|
|
+ return;
|
|
|
}
|
|
|
String[] groupColumns = groupColumn.split(",", -1);
|
|
|
if (groupColumns.length < 3) {
|
|
|
- return null;
|
|
|
+ return;
|
|
|
}
|
|
|
String groupValue = groupColumns[0];
|
|
|
String sumValue = groupColumns[1];
|
|
@@ -146,7 +189,6 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
|
|
|
retList.add(map);
|
|
|
}
|
|
|
tableLayerJgTempMapper.insertTableLayerJgTempList(retList);
|
|
|
- return tableLayerJgTempMapper.queryTableLayerJgTempList(uid);
|
|
|
}
|
|
|
|
|
|
//取相交的函数
|