From d7dca690cedd12e271f0ee0b9050679d73796f5c Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 06 一月 2025 09:28:10 +0800
Subject: [PATCH] 1

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

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
index 8a080c4..5bc2097 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
@@ -193,6 +193,7 @@
                         .select(" ( select ifnull( sum( CASE WHEN t.bill_type = 0 and yw.REVENUE_TYPE = 0 THEN yw.ACT_RECEIVABLE_FEE when  t.bill_type = 0 and yw.REVENUE_TYPE = 1 then -yw.ACT_RECEIVABLE_FEE  when t.bill_type = 1 and yw.REVENUE_TYPE = 0 then -yw.ACT_RECEIVABLE_FEE else  yw.ACT_RECEIVABLE_FEE END),0) from  yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as  actReceivableFee  ")
                         .selectAs(YwContract::getCode,YwContractBill::getContractCode)
                         .selectAs(YwCustomer::getName,YwContractBill::getCustomerName)
+                        .selectAs(Company::getId,YwContractBill::getCompanyId)
                         .selectAs(Company::getName,YwContractBill::getCompanyName)
                         .selectAs(SystemUser::getRealname,YwContractBill::getRealname)
                         .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
@@ -392,7 +393,7 @@
 
             if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){
                 for (YwContractBill ywContractBill:ywContractBillList) {
-                    if(Constants.equalsInteger(ywContractBill.getType(),Constants.ZERO)){
+                    if(Constants.equalsInteger(ywContractBill.getType(),Constants.ZERO) || Constants.equalsInteger(ywContractBill.getType(),Constants.TWO)){
                         ywContractBill.setYwContractRoomList(
                                 ywContractRoomList.stream().filter(i->(Constants.equalsInteger(i.getType(),Constants.TWO)||Constants.equalsInteger(i.getType(),Constants.ZERO))&&Constants.equalsInteger(i.getContractId(),ywContractBill.getContractId())).collect(Collectors.toList())
                         );
@@ -433,7 +434,7 @@
                 for (String codeDate:codeDateSet) {
                     //鑾峰彇褰撳墠鏃ユ湡鐨勬暟鎹�
                     List<YwContractBill> codeDateBillList =
-                            ywContractBillList.stream().filter(i->i.getCodeDate().equals(codeDate)).collect(Collectors.toList());
+                            ywContractBillList.stream().filter(i->StringUtils.isNotBlank(i.getCodeDate()) && i.getCodeDate().equals(codeDate)).collect(Collectors.toList());
                     if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(codeDateBillList)){
                         continue;
                     }

--
Gitblit v1.9.3