From a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 06 六月 2025 19:19:34 +0800
Subject: [PATCH] 开发更新

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java
index e4806d5..a462929 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java
@@ -85,7 +85,12 @@
         ){
              throw new BusinessException(ResponseStatus.BAD_REQUEST);
         }
-        YwContractBill ywContractBill = ywContractBillMapper.selectById(ywContractRevenue.getBillId());
+        YwContractBill ywContractBill = ywContractBillMapper.selectJoinOne(YwContractBill.class,
+                new MPJLambdaWrapper<YwContractBill>()
+                        .selectAll(YwContractBill.class)
+                        .selectAs(YwContract::getStatus, YwContractBill::getContractStatus)
+                        .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
+                        .eq(YwContractBill::getId,ywContractRevenue.getBillId()));
         if(Objects.isNull(ywContractBill)){
             throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌璐﹀崟淇℃伅");
         }
@@ -189,7 +194,8 @@
         ywContractRevenueMapper.insert(ywContractRevenue);
         ywContractBillMapper.updateById(ywContractBill);
         //濡傛灉璐﹀崟瀹岀粨锛屽垯鏌ヨ鍚堝悓涓嬪紑鍚腑鐨勮处鍗曟槸鍚﹀瓨鍦ㄩ��娆句腑 濡傛灉涓嶅瓨鍦ㄥ垯鏍囪鍚堝悓宸查��娆�
-        if(Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.ONE)){
+        if(Constants.equalsInteger(ywContractBill.getContractStatus(),Constants.THREE)
+                && Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.ONE)){
             if( ywContractBillMapper
                     .selectCount(new QueryWrapper<YwContractBill>().lambda().eq(YwContractBill::getContractId,ywContractBill.getContractId())
                             .ne(YwContractBill::getId,ywContractBill.getId())

--
Gitblit v1.9.3