From a5c03f435a1f108f38c6fa59ddf92365f13a680e Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 06 三月 2025 19:22:45 +0800
Subject: [PATCH] 权限

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FlowListenerService.java |   16 +++-------------
 1 files changed, 3 insertions(+), 13 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 73a6b1f..9d939a3 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
@@ -290,7 +290,7 @@
                         rentBill.setEndTime(rentBill.getStartTime().plusMonths(contract.getPayType().equals("1") ? 1 : contract.getPayType().equals("2") ? 3 : 12).with(TemporalAdjusters.lastDayOfMonth()));
                     }
                 } else {
-                    rentBill.setEndTime(contract.getEndTime());
+                    rentBill.setEndTime(rentBill.getStartTime().with(TemporalAdjusters.lastDayOfMonth()));
                 }
                 if (tContractRentType != null && rentBill.getEndTime().isAfter(tContractRentType.getChangeTime())) {
                     long moneyDays = 0;
@@ -651,16 +651,14 @@
             }
             case CATEGORY3: {
                 // 合同提前终止审批
-                int submitStatus = status == 0 ? 4 : (status == 1 ? 6 : 5);
+                int submitStatus = status == 0 ? 4 : (status == 1 ? 7 : 5);
                 contractService.updateContractAuditStatus(processParameter.getString("projectId"), submitStatus);
                 // 生成验收记录
                 TContract contract = contractService.getById(processParameter.getString("projectId"));
-                contract.setStatus("7");
                 TCheckAcceptRecord tCheckAcceptRecord = new TCheckAcceptRecord();
                 tCheckAcceptRecord.setContractId(contract.getId());
                 tCheckAcceptRecord.setHouseId(contract.getHouseId());
                 tCheckAcceptRecord.setLeaseReason("后台终止合同");
-                tCheckAcceptRecord.setStatus(false);
                 tCheckAcceptRecord.setAcceptanceTime(LocalDateTime.now());
                 LocalDate now = LocalDate.now();
                 String replace = (now + "").replace("-", "");
@@ -668,16 +666,8 @@
                         .likeRight(TCheckAcceptRecord::getAcceptanceTime, LocalDate.now())).size();
                 tCheckAcceptRecord.setCode(replace.substring(2) + String.format("%03d", size + 1));
 
-
                 checkAcceptRecordMapper.insert(tCheckAcceptRecord);
-                // 将所有未缴费账单设置未已失效
-                List<TBill> tBills = billService.list(new LambdaQueryWrapper<TBill>()
-                        .ne(TBill::getPayFeesStatus, 3)
-                        .eq(TBill::getContractId, contract.getId()));
-                for (TBill tBill : tBills) {
-                    tBill.setPayFeesStatus("5");
-                }
-                billService.updateBatchById(tBills);
+
                 break;
             }
             default:

--
Gitblit v1.7.1