From db1af623c58742f0c0829cf337b75444da02e600 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 28 二月 2025 18:07:32 +0800
Subject: [PATCH] 权限

---
 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