|
@@ -3137,6 +3137,7 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
|
.eq("contract_type", "2")
|
|
|
.eq("status_flag", "1")
|
|
|
.eq("deliver_type", "2")
|
|
|
+ .eq("agreement_type","采购合同")
|
|
|
.eq("contract_no", contractNo));
|
|
|
if (contractManagementInfo != null) {
|
|
|
ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
@@ -3189,13 +3190,14 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
|
contractManagementInfo.setContractPrice(contractManagementInfo.getPointPrice() != null ? contractManagementInfo.getPointPrice() : Float.valueOf(String.valueOf(contractManagementInfo.getUnitContractPrice())));
|
|
|
}
|
|
|
} else {
|
|
|
- //销售合同退库
|
|
|
- contractManagementInfo = contractManagementInfoService.selectOne(new EntityWrapper<ContractManagementInfo>()
|
|
|
- .eq("comp_id", compId)
|
|
|
- .eq("status_flag", "1")
|
|
|
- .eq("contract_type", "1")
|
|
|
- .eq("delete_flag", "0")
|
|
|
- .eq("contract_no", contractNo));
|
|
|
+ // 销售、代储合同退库
|
|
|
+ Wrapper<ContractManagementInfo> contractManagementInfoWrapper = new EntityWrapper();
|
|
|
+ contractManagementInfoWrapper.eq("comp_id",compId)
|
|
|
+ .eq("status_flag","1")
|
|
|
+ .eq("contract_no", contractNo).eq("delete_flag", "0");
|
|
|
+ contractManagementInfoWrapper.andNew().eq("contract_type", "1")
|
|
|
+ .or().eq("agreement_type","代储合同");
|
|
|
+ contractManagementInfo = contractManagementInfoService.selectOne(contractManagementInfoWrapper);
|
|
|
if (contractManagementInfo != null) {
|
|
|
ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
|
|
|
.eq("contract_id", contractManagementInfo.getId()));
|