From 9551da146ed2b8cd5e87b0315059b4e54d928083 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 28 二月 2025 18:07:41 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/xiaochen991015/xizang

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java
index ad9548e..fb14e9b 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TContractServiceImpl.java
@@ -478,7 +478,7 @@
         } catch (Exception e) {
             e.printStackTrace();
         }
-        TBill beforeBill = billService.lambdaQuery().eq(TBill::getContractId, contract.getId()).eq(TBill::getBillType, 1).orderByDesc(TBill::getCreateTime)
+        TBill beforeBill = billService.lambdaQuery().eq(TBill::getContractId, contract.getId()).eq(TBill::getBillType, 1).orderByDesc(TBill::getStartTime)
                 .last("limit 1").one();
         // 生成最后一笔账单
         if (!(beforeBill.getEndTime().toLocalDate().equals(contract.getEndTime().toLocalDate()))

--
Gitblit v1.7.1