| | |
| | | <if test="query.userId != null and query.userId !=''"> |
| | | and t.id = #{query.userId} |
| | | </if> |
| | | <if test="query.billType != null"> |
| | | and b.bill_type = #{query.billType} |
| | | </if> |
| | | and b.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | order by b.bill_type,b.payable_fees_time |
| | |
| | | <select id="statisticsOverdue" resultType="java.math.BigDecimal"> |
| | | SELECT ifnull(sum(outstanding_money),0) as amount FROM t_bill where pay_fees_status=4 |
| | | </select> |
| | | <select id="batchBillCount" resultType="java.lang.Integer"> |
| | | SELECT |
| | | count(b.id) |
| | | 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="userId != null and userId !=''"> |
| | | AND t.id = #{userId} |
| | | </if> |
| | | <if test="billIds != null and billIds.size() > 0"> |
| | | AND b.id NOT IN |
| | | <foreach collection="billIds" item="item" index="index" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | AND b.bill_type = 3 |
| | | </where> |
| | | </select> |
| | | </mapper> |