|
@@ -118,7 +118,12 @@ public class CPurchContractManagementServiceImpl extends ServiceImpl<CPurchContr
|
|
|
public List<CPurchContractGoodsInfo> calculateGoods(SearchGoods searchGoods) {
|
|
|
CPurchContractPriceRule priceRule = searchGoods.getPriceRule();
|
|
|
if (priceRule == null) {
|
|
|
- CPurchContractBasicInfo purch = purchContractBasicInfoService.getById(searchGoods.getBusinessKey());
|
|
|
+ CPurchContractBasicInfo purch = purchContractBasicInfoService.lambdaQuery()
|
|
|
+ .eq(CPurchContractBasicInfo::getPurchContractManagementId,searchGoods.getBusinessKey())
|
|
|
+ .one();
|
|
|
+ if (purch == null){
|
|
|
+ throw new ValidatorException(CodeUtil.FAIL,"未查询到采购合同信息!");
|
|
|
+ }
|
|
|
priceRule = purchContractPriceRuleService
|
|
|
.lambdaQuery().eq(CPurchContractPriceRule::getPurchContractBasicInfoId, purch.getId()).one();
|
|
|
}
|