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/TBillMapper.xml | 64 ++++++++++++++++++++++++++++++++ 1 files changed, 64 insertions(+), 0 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml index 80587c7..c52d5ba 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml @@ -64,4 +64,68 @@ </if> </where> </select> + <select id="getBillList" resultType="com.ruoyi.system.dto.TBillDto"> + SELECT + b.*, + t.resident_name as residentName, + t.phone, + t.account, + h.house_name as houseName + FROM + t_bill b + LEFT JOIN t_contract c ON c.contract_number = b.contract_number and c.disabled=0 + LEFT JOIN t_house h ON h.id = c.house_id and h.disabled=0 + LEFT JOIN t_tenant t ON t.id = c.tenant_id and t.disabled=0 + <where> + <if test="query.payFeesStatus != null"> + and b.pay_fees_status = #{query.payFeesStatus} + </if> + <if test="query.phone != null and query.phone !=''"> + and t.phone = #{query.phone} + </if> + <if test="query.residentName != null and query.residentName !=''"> + and t.resident_name like concat('%',#{query.residentName},'%') + </if> + <if test="query.contractNumber != null and query.contractNumber !=''"> + and b.contract_number = #{query.contractNumber} + </if> + <if test="query.userId != null and query.userId !=''"> + and t.id = #{query.userId} + </if> + and b.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} + </where> + order by b.payable_fees_time + </select> + <select id="invoiceList" resultType="com.ruoyi.system.dto.TBillDto"> + SELECT + b.*, + t.resident_name as residentName, + t.phone, + t.account, + h.house_name as houseName + FROM + t_bill b + LEFT JOIN t_contract c ON c.contract_number = b.contract_number and c.disabled=0 + LEFT JOIN t_house h ON h.id = c.house_id and h.disabled=0 + LEFT JOIN t_tenant t ON t.id = c.tenant_id and t.disabled=0 + LEFT JOIN t_invoice_to_bill tb ON b.id = tb.bill_id + <where> + <if test="query.phone != null and query.phone !=''"> + and t.phone = #{query.phone} + </if> + <if test="query.residentName != null and query.residentName !=''"> + and t.resident_name like concat('%',#{query.residentName},'%') + </if> + <if test="query.contractNumber != null and query.contractNumber !=''"> + and b.contract_number = #{query.contractNumber} + </if> + <if test="query.userId != null and query.userId !=''"> + and t.id = #{query.userId} + </if> + and b.pay_fees_status = 3 + and tb.invoice_id IS NULL + and b.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} + </where> + order by b.pay_fees_time + </select> </mapper> -- Gitblit v1.7.1