From 10fbab11ba9f3179ffa5ec5d3c6dc1c0eefec075 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期三, 12 二月 2025 10:53:27 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/xiaochen991015/xizang --- ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml index 5a57cac..9728d27 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TContractMapper.xml @@ -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