From e46313878affe7b550a02acf4c694b4e400025fb Mon Sep 17 00:00:00 2001 From: yupeng <roc__yu@163.com> Date: 星期四, 03 四月 2025 21:05:33 +0800 Subject: [PATCH] feat: 更新统计SQL,单独账单新增合同列表查询接口 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java | 1 + ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java index b8e6ddc..3c14c50 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java @@ -327,6 +327,7 @@ save.setPayType(3); save.setPayer(dto.getPayer()); save.setPayTime(billSave.getPayFeesTime()); + save.setBusinessDeptId(bill.getBusinessDeptId()); save.setSysSerialNumber(OrderNos.getDid(30)); save.setFlowType(1); save.setPaymentBillId(back.getId()); diff --git a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml index dde72c4..fab0a25 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml @@ -157,28 +157,28 @@ </select> <select id="statisticsAllRent" resultType="java.math.BigDecimal"> - SELECT ifnull(sum(payable_fees_money),0) as amount FROM t_bill + SELECT ifnull(sum(payable_fees_money),0) as amount FROM t_bill where pay_fees_status!='5' <if test='busDeptId != null and busDeptId != "" and busDeptId!="0"'> - where business_dept_id = #{busDeptId} + and business_dept_id = #{busDeptId} </if> </select> <select id="statisticsNoPay" resultType="java.math.BigDecimal"> - SELECT ifnull(sum(outstanding_money),0) as amount FROM t_bill where pay_fees_status!=3 + SELECT ifnull(sum(outstanding_money),0) as amount FROM t_bill where pay_fees_status!='3' and pay_fees_status!='5' <if test='busDeptId != null and busDeptId != "" and busDeptId!="0"'> and business_dept_id = #{busDeptId} </if> </select> <select id="statisticsPayed" resultType="java.math.BigDecimal"> - SELECT ifnull(sum(pay_fees_money),0) as amount FROM t_bill + SELECT ifnull(sum(pay_fees_money),0) as amount FROM t_bill where pay_fees_status!='5' <if test='busDeptId != null and busDeptId != "" and busDeptId!="0"'> - where business_dept_id = #{busDeptId} + and business_dept_id = #{busDeptId} </if> </select> <select id="statisticsOverdue" resultType="java.math.BigDecimal"> - SELECT ifnull(sum(outstanding_money),0) as amount FROM t_bill where pay_fees_status=4 + SELECT ifnull(sum(outstanding_money),0) as amount FROM t_bill where pay_fees_status='4' <if test='busDeptId != null and busDeptId != "" and busDeptId!="0"'> and business_dept_id = #{busDeptId} </if> -- Gitblit v1.7.1