From ed8c7a5effd0d423ce1118b680ecdca6fe732609 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期三, 02 七月 2025 16:43:13 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.11.205:9000/r/P2022036_Service

---
 src/main/java/com/lf/server/controller/data/DomainController.java |   72 +++++++++++++++++++++++++----------
 1 files changed, 51 insertions(+), 21 deletions(-)

diff --git a/src/main/java/com/lf/server/controller/data/DomainController.java b/src/main/java/com/lf/server/controller/data/DomainController.java
index ca12ef2..78b337e 100644
--- a/src/main/java/com/lf/server/controller/data/DomainController.java
+++ b/src/main/java/com/lf/server/controller/data/DomainController.java
@@ -6,7 +6,9 @@
 import com.lf.server.entity.ctrl.TabEntity;
 import com.lf.server.entity.data.DomainEntity;
 import com.lf.server.entity.sys.UserEntity;
+import com.lf.server.helper.StringHelper;
 import com.lf.server.service.all.BaseQueryService;
+import com.lf.server.service.data.DictService;
 import com.lf.server.service.data.DomainService;
 import com.lf.server.service.sys.TokenService;
 import io.swagger.annotations.Api;
@@ -36,6 +38,9 @@
     @Autowired
     BaseQueryService baseQueryService;
 
+    @Autowired
+    DictService dictService;
+
     @SysLog()
     @ApiOperation(value = "鏌ヨ璁板綍鏁�")
     @ApiImplicitParams({
@@ -50,7 +55,7 @@
 
             return success(count);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), -1);
+            return fail(ex, -1);
         }
     }
 
@@ -74,7 +79,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -82,28 +87,28 @@
     @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "ns", value = "鍚嶇О绌洪棿", dataType = "String", paramType = "query", example = "bd"),
-            @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "dlg_25w_aanp"),
-            @ApiImplicitParam(name = "code", value = "缂栫爜", dataType = "String", paramType = "query", example = "210"),
+            @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "b_hy20w_s23"),
+            @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "绛夌骇"),
             @ApiImplicitParam(name = "pageSize", value = "姣忛〉鏉℃暟", dataType = "Integer", paramType = "query", example = "10"),
             @ApiImplicitParam(name = "pageIndex", value = "鍒嗛〉鏁帮紙浠�1寮�濮嬶級", dataType = "Integer", paramType = "query", example = "1")
     })
     @GetMapping(value = "/selectByPageAndCount")
-    public ResponseMsg<List<DomainEntity>> selectByPageAndCount(String ns, String tab, String code, Integer pageSize, Integer pageIndex) {
+    public ResponseMsg<List<DomainEntity>> selectByPageAndCount(String ns, String tab, String name, Integer pageSize, Integer pageIndex) {
         try {
             if (pageSize < 1 || pageIndex < 1) {
                 return fail("姣忛〉椤垫暟鎴栧垎椤垫暟灏忎簬1", null);
             }
 
-            int count = domainService.selectCount(ns, tab, code);
+            int count = domainService.selectCount(ns, tab, name);
             if (count == 0) {
                 return success(0, null);
             }
 
-            List<DomainEntity> rs = domainService.selectByPage(ns, tab, code, pageSize, pageSize * (pageIndex - 1));
+            List<DomainEntity> rs = domainService.selectByPage(ns, tab, name, pageSize, pageSize * (pageIndex - 1));
 
             return success(count, rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -116,20 +121,45 @@
 
             return success(list);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
     @SysLog()
-    @ApiOperation(value = "鏌ヨ鎵�鏈夎〃")
-    @GetMapping(value = "/selectTabs")
-    public ResponseMsg<List<TabEntity>> selectTabs() {
+    @ApiOperation(value = "鏌ヨ鍊煎煙琛ㄩ泦鍚�")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "name", value = "鍚嶇О", dataType = "String", paramType = "query", example = "b_"),
+            @ApiImplicitParam(name = "hasGeom", value = "鍚湁Geom瀛楁", dataType = "Boolean", paramType = "query", example = "false")
+    })
+    @GetMapping(value = "/selectDomainTabs")
+    public ResponseMsg<List<TabEntity>> selectDomainTabs(String name, Boolean hasGeom) {
         try {
-            List<TabEntity> list = baseQueryService.selectTabs();
+            List<TabEntity> list = dictService.selectDictTab(name, null == hasGeom || !hasGeom ? "gid" : "geom");
 
             return success(list);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
+        }
+    }
+
+    @SysLog()
+    @ApiOperation(value = "鏍规嵁琛ㄥ悕鏌ヨ鍊煎煙鍚嶇О")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "ns", value = "鍚嶇О绌洪棿", dataType = "String", paramType = "query", example = "bd"),
+            @ApiImplicitParam(name = "tab", value = "琛ㄥ悕", dataType = "String", paramType = "query", example = "b_hy20w_s23")
+    })
+    @GetMapping(value = "/selectDomainNames")
+    public ResponseMsg<List<String>> selectDomainNames(String ns, String tab) {
+        try {
+            if (StringHelper.isEmpty(ns) || StringHelper.isEmpty(tab)) {
+                return fail("鍚嶇О绌洪棿鍜岃〃鍚嶄笉鑳戒负绌�", null);
+            }
+
+            List<String> list = domainService.selectDomainNames(ns, tab);
+
+            return success(list);
+        } catch (Exception ex) {
+            return fail(ex, null);
         }
     }
 
@@ -145,7 +175,7 @@
 
             return success(entity);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -166,7 +196,7 @@
 
             return success(count);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), -1);
+            return fail(ex, -1);
         }
     }
 
@@ -189,7 +219,7 @@
 
             return success(count);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), -1);
+            return fail(ex, -1);
         }
     }
 
@@ -205,7 +235,7 @@
 
             return success(count);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), -1);
+            return fail(ex, -1);
         }
     }
 
@@ -225,7 +255,7 @@
 
             return success(count);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), -1);
+            return fail(ex, -1);
         }
     }
 
@@ -247,7 +277,7 @@
 
             return success(count);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), -1);
+            return fail(ex, -1);
         }
     }
 
@@ -271,7 +301,7 @@
 
             return success(count);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), -1);
+            return fail(ex, -1);
         }
     }
 }

--
Gitblit v1.9.3