From 1fb65a9ecbdd618263e61d1ff7e674f4b241e391 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, 11 Apr 2025 18:15:04 +0800 Subject: [PATCH] =?UTF-8?q?uapbd=5Fbom=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=8D=95=E6=8D=AE=E7=8A=B6=E6=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=87=AA=E5=8A=A8=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/mmbd/bom/APIBomBusinessServiceImpl.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 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 116da95..a564444 100644 --- a/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java +++ b/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java @@ -191,7 +191,10 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { mapInit(original); AggBomVO agg = aggInit(paramMap); - + //2025年4月11日14点35分 --重新赋值上制单人创建人 --start + agg.getParentVO().setAttributeValue("billmaker", original.getParent().getAttributeValue("billmaker")); + agg.getParentVO().setAttributeValue("creator", original.getParent().getAttributeValue("creator")); + //2025年4月11日14点35分 --重新赋值上制单人创建人 --end JSONString checkInfo = requiredCheck(agg); if (checkInfo != null) { return checkInfo; @@ -211,7 +214,7 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { if (UFBoolean.TRUE.equals(flag)) { UFBoolean bHasOtherDefaultVersion = getIsExistDefaultVersion(agg); if (bHasOtherDefaultVersion.equals(UFBoolean.TRUE)) { - ExceptionUtils.wrappBusinessException("hasOtherDefaultVersion"); + ExceptionUtils.wrappBusinessException("有其它默认版本,请检查!!!"); } } @@ -677,7 +680,8 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { .getNewVIDByOrgID(agg.getParent().getAttributeValue("pk_org").toString()); agg.getParent().setAttributeValue("pk_org_v", pk_org_v); } - + //1、对于之前不存在的BOM,新增时:如果是传自由态,不默认且无效,如果传的是审批态默认且有效。2025年4月11日16点28分 start + Object fbillstatus = agg.getParent().getAttributeValue("fbillstatus"); if (MMValueCheck.isEmpty(agg.getParent().getAttributeValue("cbomid"))) { agg.getParent().setAttributeValue("fbomtype", Integer.valueOf(1)); agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(2)); @@ -685,6 +689,11 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { agg.getParent().setAttributeValue("hfbomsource", Integer.valueOf(1)); agg.getParent().setAttributeValue("hfbomcategory", Integer.valueOf(1)); } + if(fbillstatus!=null&&"1".equals(fbillstatus.toString())){ + agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1)); + agg.getParent().setAttributeValue("hbdefault",UFBoolean.TRUE); + } + //1、对于之前不存在的BOM,新增时:如果是传自由态,不默认且无效,如果传的是审批态默认且有效。2025年4月11日16点28分 end } private void materialidSupplement(AggBomVO agg) {