From 3fa6c9985450f998bc8575046f3beba48385e992 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 21 三月 2025 14:11:00 +0800 Subject: [PATCH] bug修改 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java index cacacb8..2bb81db 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java @@ -444,7 +444,7 @@ if (dayOfMonth == 1) { money = money.add(contract.getMonthRent()); } else { - long allDays = ChronoUnit.DAYS.between(contract.getStartPayTime(), contract.getStartPayTime().with(TemporalAdjusters.lastDayOfMonth())) + 1; + long allDays = ChronoUnit.DAYS.between(rentBill.getStartTime(), rentBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth())) + 1; money =money.add(contract.getMonthRent().divide(new BigDecimal(30), 2, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(allDays))); } // 后续 @@ -454,7 +454,6 @@ }else{ // LocalDateTime localDateTime = rentBill.getStartTime().plusMonths(1).with(TemporalAdjusters.lastDayOfMonth()); LocalDateTime localDateTime = rentBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth()).plusDays(1); - while (true){ if (localDateTime.isBefore(rentBill.getEndTime())){ localDateTime = localDateTime.plusMonths(1); -- Gitblit v1.7.1