From d119f9afb0a302577b255cf63b96b66da1799d81 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: Wed, 7 May 2025 09:28:28 +0800 Subject: [PATCH] =?UTF-8?q?uapbd=5Fbom=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=5F=E4=BF=AE=E6=94=B9=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=BC=96=E7=A0=81=5F=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=89=A9=E6=96=99=E6=9F=A5=E8=AF=A2=E4=B8=BA=E7=A9=BA=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/impl/mmbd/bom/APIBomBusinessServiceImpl.java | 11 +++++++++-- 1 file changed, 9 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 b49d012..62af813 100644 --- a/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java +++ b/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java @@ -120,6 +120,11 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { 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("根据【cmaterialid:"+items[i].getAttributeValue("cmaterialid").toString()+"】查询物料失败!!!"); + } + //2025年5月7日08点41分 添加为空校验 sdlizheng --end items[i].setAttributeValue("cmaterialvid", bankAccSub.getAttributeValue("pk_source")); } } @@ -162,7 +167,7 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { newAggVOList.add(result[0]); } return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "BOM保存成功"); - } else if ("dlkght".equals(userCode)) { + } else if ("dlkgsrm".equals(userCode)) { for (AggBomVO aggvo : commitAggvoList) { try { result = service.insertCommitBomWithParam_RequiresNew(new AggBomVO[] { aggvo }, true, true); @@ -185,9 +190,11 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { } return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "100999", "BOM保存提交成功部分成功部分失败", true); + }else{ + return ResultMessageUtil.exceptionToJSON("BOM保存失败,新增不允许单据状态自由或者空和审批通过同时存在", "999"); } } else { - return ResultMessageUtil.exceptionToJSON("BOM保存失败,新增不允许单据状态自由或者空和审批通过同时存在", "999"); + ExceptionUtils.wrappBusinessException("未匹配到符合条件的三方注册账号,请检查!!!"); } // 请求参数状态为审批通过时,自动提交--不设审批流 end return ResultMessageUtil.toJSON(result, "BOM保存成功");