From 47712cc6cd4d52fcd1dde44e2a400ccbb9c6ae7a Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 12 Apr 2024 15:20:49 +0800
Subject: [PATCH] 民警网格区域查询合并,网格员区域树查询修改,解决不显示网格问题

---
 src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
index 785f2e0..5de9fde 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -796,7 +796,7 @@
 
     <!--查询未绑定网格或警格的数据-->
     <select id="getNotBindGridOrJwGridList" resultType="org.springblade.modules.house.entity.HouseEntity">
-        select lng,lat from jczz_house where is_deleted = 0 and lng != ''
+        select id,lng,lat from jczz_house where is_deleted = 0 and lng != ''
         <if test="type == 1">
             and grid_code is null
         </if>
@@ -890,5 +890,37 @@
         ) b on a.label_name =b.labelName
     </select>
 
+    <!--查询对应的社区编号-->
+    <select id="getCommunityCode" resultType="java.lang.String">
+        SELECT
+        jpag.community_code
+        FROM
+        jczz_house jh
+        LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
+        where jh.is_deleted = 0
+        and jh.id = #{id}
+    </select>
+
+    <!--查询所有房屋总数-->
+    <select id="getAllListTotal" resultType="java.lang.Integer">
+        SELECT
+        count(*)
+        FROM
+        jczz_house jh
+        where jh.is_deleted = 0
+    </select>
+
+    <!--查询所有的房屋-->
+    <select id="getAllList" resultType="org.springblade.modules.house.vo.HouseVO">
+        SELECT
+        jh.*,
+        jpag.community_code
+        FROM
+        jczz_house jh
+        LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
+        where jh.is_deleted = 0
+        limit #{i},#{size}
+    </select>
+
 
 </mapper>

--
Gitblit v1.9.3