无关风月
2025-03-21 3fa6c9985450f998bc8575046f3beba48385e992
bug修改
1个文件已修改
3 ■■■■ 已修改文件
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);