| | |
| | | id, contract_id,contract_number, payable_fees_money, payable_fees_time, pay_fees_status, pay_fees_money, pay_fees_time, pay_fees_type, bill_type, over_days, payable_fees_penalty, start_time, end_time, bank_serial_number, outstanding_money, voucher, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | |
| | | <select id="page" resultType="com.ruoyi.system.dto.TBillDto"> |
| | | SELECT |
| | | b.*, |
| | | t.resident_name as residentName, |
| | | t.phone, |
| | | t.account |
| | | FROM |
| | | t_bill b |
| | | LEFT JOIN t_contract c ON c.contract_number = b.contract_number |
| | | LEFT JOIN t_tenant t ON t.id = c.tenant_id |
| | | <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 = #{contractNumber} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |