Selaa lähdekoodia

feat(采购合同):采购合同bug修复

Wangyafan 5 kuukautta sitten
vanhempi
commit
0a46419fba

+ 6 - 1
src/main/java/com/inkasso/factoring/purchManagement/service/impl/CPurchContractManagementServiceImpl.java

@@ -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();
         }