From 232b1ec31a5096efde34e867b64925e412f323e5 Mon Sep 17 00:00:00 2001 From: zhangmei <645025773@qq.com> Date: 星期三, 12 二月 2025 13:58:14 +0800 Subject: [PATCH] Merge branch 'xizang-changyun' of https://gitee.com/xiaochen991015/xizang into xizang-changyun --- ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml | 37 +++++++++++++++++++++++++++---------- 1 files changed, 27 insertions(+), 10 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml index 09c437c..9728d27 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml @@ -14,7 +14,7 @@ <result column="pay_type" property="payType" /> <result column="first_pay_time" property="firstPayTime" /> <result column="isIncreasing" property="isIncreasing" /> - <result column="isIncreasing_deposit" property="isincreasingDeposit" /> + <result column="isIncreasing_deposit" property="isIncreasingDeposit" /> <result column="proportion" property="proportion" /> <result column="house_id" property="houseId" /> <result column="party_one_name" property="partyOneName" /> @@ -88,15 +88,32 @@ AND t3.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} </select> <select id="contractExportList" resultType="com.ruoyi.system.model.TContract"> - select t1.*,t2.contract_number as contractNumber,t3.resident_name as residentName,t3.phone as phone - from t_bill t1 - left join t_contract t2 on t1.contract_id = t2.id - left join t_resident t3 on t2.tenant_id = t3.id - where t2.id = #{query.id} - and (t1.pay_fees_status = 1 or t1.pay_fees_status = 4) - AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} - AND t2.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} - AND t3.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} + select t1.* from t_contract t1 + <where> + <if test="query.ids != null and query.ids.size()>0"> + AND t1.id IN + <foreach collection="query.ids" item="item" open="(" separator="," close=")"> + #{item} + </foreach> + </if> + <if test="query.ids == null and query.ids.size()=0"> + <if test="query.partyTwoName != null and query.partyTwoName != ''"> + and t1.party_two_name like concat('%',#{query.partyTwoName},'%') + </if> + <if test="query.contractNumber != null and query.contractNumber != ''"> + and t1.contract_number like concat('%',#{query.contractNumber},'%') + </if> + <if test="query.contractName != null and query.contractName != ''"> + and t1.contract_name like concat('%',#{query.contractName},'%') + </if> + <if test="query.status != null"> + and t1.status = #{query.status} + </if> + </if> + + AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} + + </where> </select> </mapper> -- Gitblit v1.7.1