From 570299edad5e17997b1d456775dc0887cac0f3f2 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 05 Jan 2024 14:19:42 +0800
Subject: [PATCH] 人员房屋查询修改

---
 src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml |   10 ++++++----
 1 files changed, 6 insertions(+), 4 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 3b12950..f3d1f12 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -146,6 +146,7 @@
         jh.create_time,
         jh.update_user,
         jh.update_time,
+        jh.confirm_flag,
         jh.remark,
         jhs.district_name aoiName,
         concat( jhs.building, " ", unit, " ", room ) AS address,
@@ -215,9 +216,9 @@
                jda.aoi_code        aoiCode,
                jh.relationship     relationship
         from jczz_household jh
-                 left join jczz_doorplate_address jda on jh.house_code = jda.address_code
-        where 1 = 1
-          and associated_user_id = #{userId}
+        left join jczz_doorplate_address jda on jh.house_code = jda.address_code
+        where 1 = 1 and jh.is_deleted = 0
+        and jh.associated_user_id = #{userId}
     </select>
 
     <!--查询房屋集合信息-->
@@ -237,6 +238,7 @@
         left join jczz_user_house_label jhl on jh.id = jhl.household_id
         where 1=1 and jh.is_deleted = 0
         and jh.house_code = #{code}
+        order by jh.relationship asc,jh.id desc
     </select>
 
     <!--查询房屋集合信息-按id-->
@@ -244,7 +246,7 @@
         select
             jh.id,jh.house_code,jh.name,jh.phone_number,jh.associated_user_id,
             jh.role_type,jh.associated_user_name,jh.relationship,jh.is_primary_contact,
-            jh.residential_status,jh.gender,jh.birthday,jh.id_card,jh.hkmt_pass,jh.passport,
+            jh.residential_status,jh.gender,jh.birthday,jh.id_card,jh.card_type,jh.hkmt_pass,jh.passport,
             jh.ethnicity,jh.education,jh.resident_type,
             jh.hukou_registration,jh.resident_adcode,jh.native_place_adcode,
 			jh.religious_belief,jh.health_status,jh.disease_name,

--
Gitblit v1.9.3