From 7764819dd95302ad4130b044a379ada62ac62beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=AD=A3=40=E7=94=A8=E5=8F=8B?= Date: Fri, 9 May 2025 09:12:38 +0800 Subject: [PATCH] =?UTF-8?q?bom=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=5FV8=5F=E6=B7=BB=E5=8A=A0=E8=A1=A8=E5=A4=B4?= =?UTF-8?q?=E7=89=A9=E6=96=99=E7=BF=BB=E8=AF=91=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/mmbd/bom/APIBomBusinessServiceImpl.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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保存成功");