计费单据获取通用合同

This commit is contained in:
zhou-hongcheng
2026-03-17 21:41:15 +08:00
parent 3f69f0c315
commit 3ad35af34b
@@ -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){