From 9e194a9d6ccfdfc80c0169af6542fb192cb51eb7 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 08 Dec 2023 08:45:52 +0800
Subject: [PATCH] 新增e呼即应管理,区域查询修改

---
 src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
index f4d75a3..2cd2896 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -38,6 +38,7 @@
         <result column="remark" property="remark"/>
         <result column="is_deleted" property="isDeleted"/>
         <result column="confirm_flag" property="confirmFlag"/>
+        <result column="housing_rental_id" property="housingRentalId"/>
     </resultMap>
 
     <sql id="selectHousehold">
@@ -74,7 +75,8 @@
             update_time,
             remark,
             is_deleted,
-            confirm_flag
+            confirm_flag,
+            housing_rental_id
         from jczz_household
     </sql>
 
@@ -156,6 +158,7 @@
     <!--导出数据-->
     <select id="export" resultType="org.springblade.modules.house.excel.HouseHoldExcel">
         select
+        jh.house_code houseCode,
         jh.name,jh.phone_number phoneNumber,jh.role_type roleType,jh.relationship relationship,
         jh.is_primary_contact isPrimaryContact,jh.residential_status residentialStatus,jh.gender,
         jh.birthday,jh.id_card idCard,jh.hkmt_pass hkmtPass,jh.passport,jh.ethnicity,jh.education,
@@ -183,18 +186,17 @@
 
 
     <select id="statistics" resultType="java.lang.Integer">
-
         SELECT
             count(1)
         FROM
             jczz_grid_range jgr
                 LEFT JOIN jczz_grid jg ON jg.id = jgr.grid_id
+                LEFT JOIN jczz_gridman jgm on jg.id = jgm.grid_id
                 LEFT JOIN jczz_household jh on jh.house_code=jgr.house_code
         WHERE
             jg.is_deleted = 0
           and jh.confirm_flag = 0
-          AND jg.user_id = #{userId}
-
+          AND jgm.user_id = #{userId}
     </select>
 
     <!--查询物业-->
@@ -213,15 +215,14 @@
 
     <!--查询网格-->
     <select id="getGrid" resultType="org.springblade.modules.house.vo.HouseholdOtherVO">
-        SELECT
-            jg.id as code,
-            jgm.gridman_name as name,jgm.mobile as phone
-        FROM
-            jczz_grid_range jgr
-        LEFT JOIN jczz_grid jg ON jg.id = jgr.grid_id and jg.is_deleted = 0
-        LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id and jgm.is_deleted = 0
-        WHERE 1=1
-        AND jgr.house_code = #{household.houseCode}
+        SELECT jg.id            as code,
+               jgm.gridman_name as name,
+               jgm.mobile       as phone
+        FROM jczz_grid_range jgr
+                 LEFT JOIN jczz_grid jg ON jg.id = jgr.grid_id and jg.is_deleted = 0
+                 LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id and jgm.is_deleted = 0
+        WHERE 1 = 1
+          AND jgr.house_code = #{household.houseCode} limit 1
     </select>
 
     <!--查询公安信息-->

--
Gitblit v1.9.3