From 01cf8140ee6ea6a98ff12d5ef973b050fbf75bf1 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Sat, 16 Mar 2024 15:23:02 +0800
Subject: [PATCH] 场所添加字段+从业人员添加字段

---
 src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml |  170 +++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 105 insertions(+), 65 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 784962a..0296e5e 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -4,73 +4,106 @@
 
     <!-- 通用查询映射结果 -->
     <resultMap id="householdResultMap" type="org.springblade.modules.house.entity.HouseholdEntity">
-        <result column="id" property="id"/>
-        <result column="house_code" property="houseCode"/>
-        <result column="name" property="name"/>
-        <result column="phone_number" property="phoneNumber"/>
-        <result column="associated_user_id" property="associatedUserId"/>
-        <result column="relationship" property="relationship"/>
-        <!--        <result column="primary_contact" property="primaryContact"/>-->
-        <result column="residential_status" property="residentialStatus"/>
-        <result column="gender" property="gender"/>
-        <result column="birthday" property="birthday"/>
-        <result column="id_card" property="idCard"/>
-        <result column="ethnicity" property="ethnicity"/>
-        <result column="education" property="education"/>
-        <result column="hukou_registration" property="hukouRegistration"/>
-        <result column="work_status" property="workStatus"/>
-        <result column="employer" property="employer"/>
-        <result column="marital_status" property="maritalStatus"/>
-        <result column="card_number" property="cardNumber"/>
-        <result column="other_contact" property="otherContact"/>
-        <result column="current_address" property="currentAddress"/>
-        <result column="disability_cert" property="disabilityCert"/>
-        <!--        <result column="data_status" property="dataStatus"/>-->
-        <result column="role_type" property="roleType"/>
-        <result column="party_ember" property="partyEmber"/>
-        <result column="create_user" property="createUser"/>
-        <result column="create_time" property="createTime"/>
-        <result column="update_user" property="updateUser"/>
-        <result column="update_time" property="updateTime"/>
-        <result column="remark" property="remark"/>
-        <result column="is_deleted" property="isDeleted"/>
-        <result column="confirm_flag" property="confirmFlag"/>
-        <result column="housing_rental_id" property="housingRentalId"/>
+        <result property="id"    column="id"    />
+        <result property="houseCode"    column="house_code"    />
+        <result property="name"    column="name"    />
+        <result property="phoneNumber"    column="phone_number"    />
+        <result property="associatedUserId"    column="associated_user_id"    />
+        <result property="roleType"    column="role_type"    />
+        <result property="relationship"    column="relationship"    />
+        <result property="isPrimaryContact"    column="is_primary_contact"    />
+        <result property="residentialStatus"    column="residential_status"    />
+        <result property="gender"    column="gender"    />
+        <result property="birthday"    column="birthday"    />
+        <result property="idCard"    column="id_card"    />
+        <result property="cardType"    column="card_type"    />
+        <result property="cardNo"    column="card_no"    />
+        <result property="ethnicity"    column="ethnicity"    />
+        <result property="education"    column="education"    />
+        <result property="residentType"    column="resident_type"    />
+        <result property="hukouRegistration"    column="hukou_registration"    />
+        <result property="residentAdcode"    column="resident_adcode"    />
+        <result property="nativePlaceAdcode"    column="native_place_adcode"    />
+        <result property="religiousBelief"    column="religious_belief"    />
+        <result property="healthStatus"    column="health_status"    />
+        <result property="diseaseName"    column="disease_name"    />
+        <result property="workStatus"    column="work_status"    />
+        <result property="employer"    column="employer"    />
+        <result property="occupation"    column="occupation"    />
+        <result property="cmpyRegAddr"    column="cmpy_reg_addr"    />
+        <result property="goOutAddr"    column="go_out_addr"    />
+        <result property="goOutWhere"    column="go_out_where"    />
+        <result property="goOutTime"    column="go_out_time"    />
+        <result property="goOutReason"    column="go_out_reason"    />
+        <result property="maritalStatus"    column="marital_status"    />
+        <result property="cardNumber"    column="card_number"    />
+        <result property="otherContact"    column="other_contact"    />
+        <result property="homeAdcode"    column="home_adcode"    />
+        <result property="currentAddress"    column="current_address"    />
+        <result property="disabilityCert"    column="disability_cert"    />
+        <result property="partyEmber"    column="party_ember"    />
+        <result property="housingRentalId"    column="housing_rental_id"    />
+        <result property="confirmFlag"    column="confirm_flag"    />
+        <result property="createUser"    column="create_user"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateUser"    column="update_user"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+        <result property="isDeleted"    column="is_deleted"    />
+        <result property="volunteerOrg"    column="volunteer_org"    />
     </resultMap>
 
     <sql id="selectHousehold">
-        select id,
-               house_code,
-               name,
-               phone_number,
-               associated_user_id,
-               role_type,
-               relationship,
-               is_primary_contact,
-               residential_status,
-               gender,
-               birthday,
-               id_card,
-               ethnicity,
-               education,
-               hukou_registration,
-               work_status,
-               employer,
-               marital_status,
-               card_number,
-               other_contact,
-               current_address,
-               disability_cert,
-               party_ember,
-               create_user,
-               create_time,
-               update_user,
-               update_time,
-               remark,
-               is_deleted,
-               confirm_flag,
-               housing_rental_id
-        from jczz_household
+        select
+            id,
+            house_code,
+            name,
+            phone_number,
+            associated_user_id,
+            role_type,
+            relationship,
+            is_primary_contact,
+            residential_status,
+            gender,
+            birthday,
+            id_card,
+            card_type,
+            card_no,
+            ethnicity,
+            education,
+            resident_type,
+            hukou_registration,
+            resident_adcode,
+            native_place_adcode,
+            religious_belief,
+            health_status,
+            disease_name,
+            work_status,
+            employer,
+            occupation,
+            cmpy_reg_addr,
+            go_out_addr,
+            go_out_where,
+            go_out_time,
+            go_out_reason,
+            marital_status,
+            card_number,
+            other_contact,
+            home_adcode,
+            current_address,
+            disability_cert,
+            party_ember,
+            housing_rental_id,
+            confirm_flag,
+            create_user,
+            create_time,
+            update_user,
+            update_time,
+            remark,
+            is_deleted,
+            volunteer_org
+        from
+            jczz_household
     </sql>
 
     <resultMap id="householdAndLabelMap" type="org.springblade.modules.house.vo.HouseholdVO" autoMapping="true">
@@ -158,6 +191,7 @@
         jg.grid_name,
         jhs.building,
         jhs.district_code aoiCode,
+        jh.volunteer_org,
         jhs.unit
         FROM
         jczz_household jh
@@ -173,6 +207,9 @@
             </if>
             <if test="household.name!=null and household.name !=''">
                 and jh.name like concat('%',#{household.name},'%')
+            </if>
+            <if test="volunteerOrg != null  and volunteerOrg != ''">
+                and jh.volunteer_org  like concat('%',#{household.volunteerOrg},'%')
             </if>
             <if test="household.houseCode!=null and household.houseCode !=''">
                 and jh.house_code = #{household.houseCode}
@@ -319,6 +356,7 @@
         concat( jhs.building, " ", unit, " ", room ) AS address,
         jda.town_street_name AS townStreetName,
         jda.nei_name AS neiName,
+        jh.volunteer_org,
         jg.grid_name
         FROM
         jczz_household jh
@@ -452,6 +490,7 @@
                jh.remark,
                jh.confirm_flag,
                jh.housing_rental_id,
+               jh.volunteer_org,
                if(jda.id is not null, substring(jda.town_street_code, 1, 9), jh.home_adcode) as home_adcode,
                br1.name                                                                      as residentAdName,
                br1.province_code                                                             as residentProvinceAdCode,
@@ -492,7 +531,7 @@
         jh.is_primary_contact isPrimaryContact,jh.residential_status residentialStatus,jh.gender,
         jh.birthday,jh.id_card idCard,jh.ethnicity,jh.education,
         jh.hukou_registration hukouRegistration,jh.work_status workStatus,jh.employer,jh.marital_status maritalStatus,
-        jh.card_number cardNumber,jh.other_contact otherContact,jh.current_address currentAddress,
+        jh.card_number cardNumber,jh.other_contact otherContact,jh.current_address currentAddress,jh.volunteer_org,
         jh.disability_cert disabilityCert,jh.party_ember partyEmber,jh.remark,
         jhs.district_name aoiName,
         concat(jhs.building," ",unit," ",room) as address
@@ -887,6 +926,7 @@
         jh.remark,
         jh.confirm_flag,
         jh.housing_rental_id,
+        jh.volunteer_org,
         IF
         ( jda.id IS NOT NULL, substring( jda.town_street_code, 1, 9 ), jh.home_adcode ) AS home_adcode,
         jhs.district_name aoiName,

--
Gitblit v1.9.3