From efa0b80ea80c36072cc3cb8917697e87297a72cf 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: Thu, 15 May 2025 16:56:28 +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=5FV10=5F=E6=B7=BB=E5=8A=A0=E7=89=A9=E6=96=99?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/mmbd/bom/APIBomBusinessServiceImpl.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 b781f31..86fbae3 100644 --- a/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java +++ b/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java @@ -282,10 +282,24 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { BillFieldsCodeToPkUtil.doTranslateVOFields(aggVOs); IUifService iUifService = NCLocator.getInstance().lookup(IUifService.class); for (AggBomVO aggtwo : aggVOs) { + //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 BomItemVO[] items = aggtwo.getChildrenVO(); for (int i = 0; i < items.length; i++) { MaterialVO bankAccSub = (MaterialVO) iUifService.queryByPrimaryKey(MaterialVO.class, items[i].getAttributeValue("cmaterialid").toString()); + //2025年5月7日08点41分 添加为空校验 sdlizheng --start + if(bankAccSub==null){ + ExceptionUtils.wrappBusinessException("根据物料【"+items[i].getAttributeValue("cmaterialid").toString()+"】查询物料失败,请在BIP里确认是否物料已存在!!!"); + } + //2025年5月7日08点41分 添加为空校验 sdlizheng --end items[i].setAttributeValue("cmaterialvid", bankAccSub.getAttributeValue("pk_source")); } }