|
@@ -118,7 +118,12 @@ public class CPurchContractManagementServiceImpl extends ServiceImpl<CPurchContr
|
|
public List<CPurchContractGoodsInfo> calculateGoods(SearchGoods searchGoods) {
|
|
public List<CPurchContractGoodsInfo> calculateGoods(SearchGoods searchGoods) {
|
|
CPurchContractPriceRule priceRule = searchGoods.getPriceRule();
|
|
CPurchContractPriceRule priceRule = searchGoods.getPriceRule();
|
|
if (priceRule == null) {
|
|
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
|
|
priceRule = purchContractPriceRuleService
|
|
.lambdaQuery().eq(CPurchContractPriceRule::getPurchContractBasicInfoId, purch.getId()).one();
|
|
.lambdaQuery().eq(CPurchContractPriceRule::getPurchContractBasicInfoId, purch.getId()).one();
|
|
}
|
|
}
|