From 09f98d8509fb22db2edcc18bdafc0c7ab7c3baa1 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期一, 07 四月 2025 09:12:05 +0800
Subject: [PATCH] Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/xizang into dev

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 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 752d4bf..5c98020 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
@@ -307,6 +307,7 @@
                     TContractRentType tContractRentType = contractRentTypes.stream().filter(e -> e.getContractId().equals(contract.getId())).findFirst().orElse(null);
                     // 生成第一笔账单
                     // 第一次应缴费日期
+
                     LocalDateTime firstPayTime = contract.getStartTime().plusDays(10).withHour(0).withMinute(0).withSecond(0);
                     TBill rentBill = new TBill();
                     rentBill.setContractId(contract.getId());
@@ -989,7 +990,13 @@
                             BigDecimal originalMoney = new BigDecimal("0");
                             // 不需要涨租金的时间段
                             long originalDays = 0;
-                            if (tBill.getStartTime().getDayOfMonth()==1&&(tBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth()).toLocalDate().isAfter(tBill.getEndTime().toLocalDate())||tBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth()).toLocalDate().equals(tBill.getEndTime().toLocalDate()))){
+                            if (tBill.getStartTime().getDayOfMonth()==1
+                                    &&
+                                    (
+                                            tBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth()).toLocalDate().isBefore(tBill.getEndTime().toLocalDate())
+                                            ||tBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth()).toLocalDate().equals(tBill.getEndTime().toLocalDate())
+                                    )
+                            ){
                                 // 计算整月
                                 originalMoney = originalMoney.add(contract.getChangeRent());
                             }else{

--
Gitblit v1.7.1