Browse Source

查询图层接口添加layerId字段

LAPTOP-BJJ3IV5R\SIWEI 11 months ago
parent
commit
7c80657990

+ 2 - 2
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/table/TableDataSelectController.java

@@ -27,8 +27,8 @@ public class TableDataSelectController extends BaseController {
     }
 
     @GetMapping("/query/layer")
-    public RequestResult GetTestList(String defaultType) {
-        return RequestResult.success(tableDataSelectService.dataQueryLayer(defaultType));
+    public RequestResult queryLayerList(String defaultType,String layerId) {
+        return RequestResult.success(tableDataSelectService.dataQueryLayer(defaultType,layerId));
     }
 
 }

+ 4 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/table/TableDataSelectServiceImpl.java

@@ -616,11 +616,14 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
 
 
     @Override
-    public List<TableLayerDTO> dataQueryLayer(String defaultType) {
+    public List<TableLayerDTO> dataQueryLayer(String defaultType, String layerId) {
         QueryWrapper<TableLayerDTO> queryTableLayerWrapper = new QueryWrapper<>();
         if (StringUtils.isNotBlank(defaultType)) {
             queryTableLayerWrapper.eq("default_type", defaultType);
         }
+        if (StringUtils.isNotBlank(layerId)) {
+            queryTableLayerWrapper.or(wq -> wq.ne("layer_id", layerId).or().isNull("layer_id"));
+        }
         queryTableLayerWrapper.eq("pid", "0");
         queryTableLayerWrapper.orderByAsc("sort");
         return tableLayerMapper.selectList(queryTableLayerWrapper);

+ 2 - 3
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/table/TableDataSelectService.java

@@ -10,14 +10,13 @@ public interface TableDataSelectService {
     public Map dataSelectByPoint(String pointEWkt, String bsm);
 
     /**
-     *
      * @param sourcePointWkt
      * @param sourceLayerId
      * @param sourceLayerType 0图层ID 1数据库表id
      * @param queryTableId
      * @return
      */
-    public Map dataQueryByPoint(String sourcePointWkt,String sourceLayerId,String sourceLayerType, String queryTableId);
+    public Map dataQueryByPoint(String sourcePointWkt, String sourceLayerId, String sourceLayerType, String queryTableId);
 
-    public List<TableLayerDTO> dataQueryLayer(String defaultType);
+    public List<TableLayerDTO> dataQueryLayer(String defaultType, String layerId);
 }