From 3ad35af34bfada8b791738f95fed6a8f387bf06d Mon Sep 17 00:00:00 2001 From: zhou-hongcheng <1064771933@qq.com> Date: Tue, 17 Mar 2026 21:41:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E8=B4=B9=E5=8D=95=E6=8D=AE=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E9=80=9A=E7=94=A8=E5=90=88=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ContractManageApplicationService.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/application/service/contractManage/ContractManageApplicationService.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/application/service/contractManage/ContractManageApplicationService.java index bb67a7a27..6c4383629 100644 --- a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/application/service/contractManage/ContractManageApplicationService.java +++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/application/service/contractManage/ContractManageApplicationService.java @@ -420,10 +420,15 @@ public class ContractManageApplicationService { if(null == contractManagePO){ if(contractType==1){ //仓储合同 - resultContract = contractManagePOList.stream().filter(item -> item.getContractType()==1).findFirst().orElse(null); + resultContract = contractManagePOList.stream() + .filter(item -> + item.getContractType()==1 && + item.getCommonContractFlag() == 1 && item.getContractState() ==2) + .findFirst().orElse(null); }else{ //运输合同 - resultContract = contractManagePOList.stream().filter(item -> item.getContractType()==2).findFirst().orElse(null); + resultContract = contractManagePOList.stream().filter(item -> item.getContractType()==2 + && item.getCommonContractFlag() == 1 && item.getContractState() ==2).findFirst().orElse(null); } }else { resultContract = contractManagePO; @@ -431,10 +436,12 @@ public class ContractManageApplicationService { }else { if(contractType==1){ //仓储合同 - resultContract = contractManagePOList.stream().filter(contractManagePO -> contractManagePO.getContractType()==1).findFirst().orElse(null); + resultContract = contractManagePOList.stream().filter(contractManagePO -> contractManagePO.getContractType()==1 + && contractManagePO.getCommonContractFlag() == 1 && contractManagePO.getContractState() ==2).findFirst().orElse(null); }else{ //运输合同 - resultContract = contractManagePOList.stream().filter(contractManagePO -> contractManagePO.getContractType()==2).findFirst().orElse(null); + resultContract = contractManagePOList.stream().filter(contractManagePO -> contractManagePO.getContractType()==2 + && contractManagePO.getCommonContractFlag() == 1 && contractManagePO.getContractState() ==2).findFirst().orElse(null); } } if(null == resultContract){