| | |
| | | h.house_name as houseName |
| | | FROM |
| | | t_bill b |
| | | LEFT JOIN t_contract c ON c.contract_number = b.contract_number |
| | | LEFT JOIN t_house h ON h.id = c.house_id |
| | | LEFT JOIN t_tenant t ON t.id = c.tenant_id |
| | | 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 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 |
| | |
| | | h.house_name as houseName |
| | | FROM |
| | | t_bill b |
| | | LEFT JOIN t_contract c ON c.contract_number = b.contract_number |
| | | LEFT JOIN t_house h ON h.id = c.house_id |
| | | LEFT JOIN t_tenant t ON t.id = c.tenant_id |
| | | 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.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.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> |