From 8910f74264e7b1e0d66871002d1e379c0d4cb1a1 Mon Sep 17 00:00:00 2001 From: yupeng <roc__yu@163.com> Date: 星期二, 04 三月 2025 16:54:26 +0800 Subject: [PATCH] feat: 统计设置返回默认值0,现金支付,修改判断 --- ruoyi-admin/pom.xml | 10 +++++----- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBillServiceImpl.java | 2 +- ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 3fa05b9..97f4520 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -32,11 +32,11 @@ <version>31.1-jre</version> <!-- 请根据需要选择合适的版本 --> </dependency> <!-- spring-boot-devtools --> -<!-- <dependency>--> -<!-- <groupId>org.springframework.boot</groupId>--> -<!-- <artifactId>spring-boot-devtools</artifactId>--> -<!-- <optional>true</optional> <!– 表示依赖不会传递 –>--> -<!-- </dependency>--> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-devtools</artifactId> + <optional>true</optional> <!-- 表示依赖不会传递 --> + </dependency> <!-- swagger3--> <dependency> 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 896ea36..f5b560c 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 @@ -463,7 +463,7 @@ throw new ServiceException("实付金额不能高于于流水可抵扣剩余金额"); } //如果实付金额大于欠费金额 - if (dto.getAmount().compareTo(bill.getOutstandingMoney())>=0){ + if (dto.getAmount().compareTo(bill.getOutstandingMoney())>0){ throw new ServiceException("实付金额不能高于该账单欠费金额"); } } diff --git a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml index f5df42e..886aa8d 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TBillMapper.xml @@ -148,18 +148,18 @@ </select> <select id="statisticsAllRent" resultType="java.math.BigDecimal"> - SELECT sum(payable_fees_money) as amount FROM t_bill + SELECT ifnull(sum(payable_fees_money),0) as amount FROM t_bill </select> <select id="statisticsNoPay" resultType="java.math.BigDecimal"> - SELECT sum(outstanding_money) 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 </select> <select id="statisticsPayed" resultType="java.math.BigDecimal"> - SELECT sum(pay_fees_money) as amount FROM t_bill + SELECT ifnull(sum(pay_fees_money),0) as amount FROM t_bill </select> <select id="statisticsOverdue" resultType="java.math.BigDecimal"> - SELECT sum(outstanding_money) 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 </select> </mapper> -- Gitblit v1.7.1