yupeng
2025-03-26 8d0009c7b03ea915955bf6b84a548699a32f23e5
ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml
@@ -62,6 +62,9 @@
            <if test="query.userId != null and query.userId !=''">
                and t.id = #{query.userId}
            </if>
            <if test="query.businessDeptId != null and query.businessDeptId !=''">
                and b.business_dept_id = #{businessDeptId}
            </if>
            <if test="query.billType != null">
                and b.bill_type = #{query.billType}
            </if>
@@ -155,18 +158,22 @@
    <select id="statisticsAllRent" resultType="java.math.BigDecimal">
        SELECT ifnull(sum(payable_fees_money),0) as amount FROM t_bill
        where  business_dept_id=#{busDeptId}
    </select>
    <select id="statisticsNoPay" resultType="java.math.BigDecimal">
        SELECT ifnull(sum(outstanding_money),0) as amount FROM t_bill where pay_fees_status!=3
        where  business_dept_id=#{busDeptId}
    </select>
    <select id="statisticsPayed" resultType="java.math.BigDecimal">
        SELECT ifnull(sum(pay_fees_money),0) as amount FROM t_bill
        where  business_dept_id=#{busDeptId}
    </select>
    <select id="statisticsOverdue" resultType="java.math.BigDecimal">
        SELECT ifnull(sum(outstanding_money),0) as amount FROM t_bill where pay_fees_status=4
        where  business_dept_id=#{busDeptId}
    </select>
    <select id="batchBillCount" resultType="java.lang.Integer">
        SELECT