diff --git a/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java b/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java index bd67207..bd55ed5 100644 --- a/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java +++ b/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java @@ -117,6 +117,15 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { IUifService iUifService = NCLocator.getInstance().lookup(IUifService.class); for (AggBomVO aggtwo : aggVOs) { BomItemVO[] items = aggtwo.getChildrenVO(); + //2025年5月9日08点56分--添加表头物料翻译校验 start + if(aggtwo.getParent().getAttributeValue("hcmaterialid")!=null){ + MaterialVO headMaterialVO = (MaterialVO) iUifService.queryByPrimaryKey(MaterialVO.class, + aggtwo.getParent().getAttributeValue("hcmaterialid").toString()); + if(headMaterialVO==null){ + ExceptionUtils.wrappBusinessException("根据物料【"+aggtwo.getParent().getAttributeValue("hcmaterialid").toString()+"】查询物料失败,请在BIP里确认是否物料已存在!!!"); + } + } + //2025年5月9日08点56分--添加表头物料翻译校验 end for (int i = 0; i < items.length; i++) { MaterialVO bankAccSub = (MaterialVO) iUifService.queryByPrimaryKey(MaterialVO.class, items[i].getAttributeValue("cmaterialid").toString()); @@ -191,10 +200,10 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "100999", "BOM保存提交成功部分成功部分失败", true); }else{ - return ResultMessageUtil.exceptionToJSON("BOM保存失败,新增不允许单据状态自由或者空和审批通过同时存在", "999"); + ExceptionUtils.wrappBusinessException("未匹配到符合条件的三方注册用户账号【"+userCode+"】,请检查!!!"); } } else { - ExceptionUtils.wrappBusinessException("未匹配到符合条件的三方注册账号,请检查!!!"); + return ResultMessageUtil.exceptionToJSON("BOM保存失败,新增不允许单据状态自由或者空和审批通过同时存在", "999"); } // 请求参数状态为审批通过时,自动提交--不设审批流 end return ResultMessageUtil.toJSON(result, "BOM保存成功");