From ad4416e4bdaef4fc8cae90210e98d1111acdcafb Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Sat, 06 Jan 2024 08:48:02 +0800
Subject: [PATCH] 房屋查询修改

---
 src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml |   44 +++++++++++++-------------------------------
 1 files changed, 13 insertions(+), 31 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 f3d1f12..2dab075 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -116,38 +116,20 @@
     <!--自定义分页数据查询-->
     <select id="selectHouseholdPage" resultMap="householdPageAndLabelMap">
         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.birthday,
-        jh.id_card,
-        jh.hkmt_pass,
-        jh.passport,
+        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.card_type,jh.hkmt_pass,
         ifnull( jh.gender, CASE WHEN substring( jh.id_card, 17, 1 )% 2 = 1 THEN 1 ELSE 0 END ) AS gender,
-        jh.ethnicity,
-        jh.education,
-        jh.hukou_registration,
-        jh.work_status,
-        employer,
-        jh.marital_status,
-        jh.card_number,
-        jh.other_contact,
-        jh.current_address,
-        jh.disability_cert,
-        jh.party_ember,
-        jh.create_user,
-        jh.create_time,
-        jh.update_user,
-        jh.update_time,
-        jh.confirm_flag,
-        jh.remark,
+        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,
+        jh.work_status,jh.employer,jh.occupation,jh.cmpy_reg_addr,
+        jh.go_out_addr,jh.go_out_where,jh.go_out_time,jh.go_out_reason,
+        jh.marital_status,jh.card_number,jh.other_contact,
+        if(jda.id is not null,jda.address_name,jh.current_address) as current_address,
+        jh.disability_cert,jh.party_ember,jh.remark,
+        jh.confirm_flag,jh.housing_rental_id,
+        if(jda.id is not null,substring(jda.town_street_code,1,9),jh.home_adcode) as home_adcode,
         jhs.district_name aoiName,
         concat( jhs.building, " ", unit, " ", room ) AS address,
         jda.town_street_name AS townStreetName,

--
Gitblit v1.9.3