计费单据获取通用合同
This commit is contained in:
+11
-4
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user