forked from gzzfw/backEnd/gz-dyh

zhouxiantao
2024-10-09 3a73d5c21bb96dde33c97a6d4d50f4632678b329
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CasePersonMapper.xml
@@ -4,8 +4,8 @@
 * @title: 纠纷当事人信息表
 * @description: 自定义sql,请自行实现业务逻辑
 * @company: hugeinfo
 * @author: wangwh
 * @time:2024-08-27 10:48:18
 * @author: liyj
 * @time:2024-09-24 14:18:41
 * @version 1.0.0
-->
<mapper namespace="cn.huge.module.cases.dao.mapper.CasePersonMapper">
@@ -14,6 +14,7 @@
            <result property="id" column="id"/>
            <result property="caseId" column="case_id"/>
            <result property="partyUserId" column="party_user_id"/>
            <result property="companyId" column="company_id"/>
            <result property="perType" column="per_type"/>
            <result property="perTypeName" column="per_type_name"/>
            <result property="perClass" column="per_class"/>
@@ -49,6 +50,7 @@
            <result property="placeVillage" column="place_village"/>
            <result property="placeVillageName" column="place_village_name"/>
            <result property="placeAddr" column="place_addr"/>
            <result property="workUnitId" column="work_unit_id"/>
            <result property="workUnit" column="work_unit"/>
            <result property="nation" column="nation"/>
            <result property="nationName" column="nation_name"/>
@@ -73,6 +75,7 @@
        id,
        case_id,
        party_user_id,
        company_id,
        per_type,
        per_type_name,
        per_class,
@@ -108,6 +111,7 @@
        place_village,
        place_village_name,
        place_addr,
        work_unit_id,
        work_unit,
        nation,
        nation_name,
@@ -129,6 +133,7 @@
    <sql id="set-part">
            <if test="entity.caseId != null">case_id = #{entity.caseId},</if>
            <if test="entity.partyUserId != null">party_user_id = #{entity.partyUserId},</if>
            <if test="entity.companyId != null">company_id = #{entity.companyId},</if>
            <if test="entity.perType != null">per_type = #{entity.perType},</if>
            <if test="entity.perTypeName != null">per_type_name = #{entity.perTypeName},</if>
            <if test="entity.perClass != null">per_class = #{entity.perClass},</if>
@@ -164,6 +169,7 @@
            <if test="entity.placeVillage != null">place_village = #{entity.placeVillage},</if>
            <if test="entity.placeVillageName != null">place_village_name = #{entity.placeVillageName},</if>
            <if test="entity.placeAddr != null">place_addr = #{entity.placeAddr},</if>
            <if test="entity.workUnitId != null">work_unit_id = #{entity.workUnitId},</if>
            <if test="entity.workUnit != null">work_unit = #{entity.workUnit},</if>
            <if test="entity.nation != null">nation = #{entity.nation},</if>
            <if test="entity.nationName != null">nation_name = #{entity.nationName},</if>
@@ -193,6 +199,9 @@
                </if>
                <if test="terms.partyUserId != null and terms.partyUserId !=''">
                    and party_user_id = #{terms.partyUserId}
                </if>
                <if test="terms.companyId != null and terms.companyId !=''">
                    and company_id = #{terms.companyId}
                </if>
                <if test="terms.perType != null and terms.perType !=''">
                    and per_type = #{terms.perType}
@@ -299,6 +308,9 @@
                <if test="terms.placeAddr != null and terms.placeAddr !=''">
                    and place_addr = #{terms.placeAddr}
                </if>
                <if test="terms.workUnitId != null and terms.workUnitId !=''">
                    and work_unit_id = #{terms.workUnitId}
                </if>
                <if test="terms.workUnit != null and terms.workUnit !=''">
                    and work_unit = #{terms.workUnit}
                </if>
@@ -339,7 +351,7 @@
                    and cust_id = #{terms.custId}
                </if>
                <if test="terms.deleteStatus = null and terms.deleteStatus =''">
                    and delete_status = '0'
                    and delete_status = 0
                </if>
                <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
                    and delete_status = #{terms.deleteStatus}
@@ -429,4 +441,14 @@
        <include refid="table-name" />
        where case_id = #{caseId}
    </select>
</mapper>
    <!--  根据纠纷编号查询人员编号  -->
    <select id="listByCertiNo" resultMap="dataResult">
        select
        a.case_id,a.certi_no,a.per_type
        from
            dyh_case_person a INNER JOIN dyh_case_info b ON a.case_id = b.id
        where a.certi_no = #{certiNo} and b.delete_status = 0
    </select>
</mapper>