From d9d35919a74fdf69260c19fa79442391bab2363b Mon Sep 17 00:00:00 2001 From: mzr Date: Sun, 21 Sep 2025 18:21:28 +0800 Subject: [PATCH] =?UTF-8?q?BOM=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mmbd/bom/APIBomBusinessServiceImpl.java | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 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 22909fc0..7601682a 100644 --- a/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java +++ b/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java @@ -39,6 +39,7 @@ import nc.vo.bd.material.MaterialVO; import nc.vo.bd.material.MaterialVersionVO; import nc.vo.bd.material.plan.MaterialPlanVO; import nc.vo.bd.vermatch.entity.BomMatchRtVO; +import nc.vo.org.OrgVO; import nc.vo.pmpub.project.ProjectHeadVO; import nc.vo.pub.BusinessException; import nc.vo.pub.CircularlyAccessibleValueObject; @@ -926,12 +927,23 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { } Object fbillstatus = agg.getParent().getAttributeValue("fbillstatus"); if (MMValueCheck.isEmpty(agg.getParent().getAttributeValue("cbomid"))) { + BomVO headVO = (BomVO) agg.getParent(); + UFBoolean hbdefault = headVO.getHbdefault()==null?UFBoolean.FALSE:headVO.getHbdefault(); agg.getParent().setAttributeValue("fbomtype", Integer.valueOf(1)); agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(2)); agg.getParent().setAttributeValue("fbillstatus", Integer.valueOf(-1)); agg.getParent().setAttributeValue("hfbomsource", Integer.valueOf(1)); agg.getParent().setAttributeValue("hfbomcategory", Integer.valueOf(1)); - if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode) || "C029".equals(this.orgCodeFlag) || "hgqwms".equals(userCode)) { + //根据传过来的是否默认进行赋值 + if("C030".equals(this.orgCodeFlag)) { + //箱变根据传过来的是否默认对bom进行默认操作 + if(hbdefault.booleanValue()) { + agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1)); + agg.getParent().setAttributeValue("hbdefault", UFBoolean.TRUE); + } + } + + if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode) || "C029".equals(this.orgCodeFlag)|| "C025".equals(this.orgCodeFlag)|| "hgqwms".equals(userCode)) { // sdlizheng // 1、对于之前不存在的BOM,新增时:如果是传自由态,不默认且无效,走标准逻辑,如果传的是审批态默认且有效。2025年4月11日16点28分 start if (fbillstatus != null && "1".equals(fbillstatus.toString())) { @@ -1111,13 +1123,13 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { } handleEvent(items); -// -// IHttpPostOtherSys mesUtils = NCLocator.getInstance().lookup(IHttpPostOtherSys.class); -// -// String code = mesUtils.transferCodeByPk(OrgVO.getDefaultTableName(), OrgVO.CODE, OrgVO.PK_ORG, pk_org); -// if(mesUtils.checkIfIncludeOrg(code)) { -// this.handleEventTwo(agg); -// } + + IHttpPostOtherSys mesUtils = NCLocator.getInstance().lookup(IHttpPostOtherSys.class); + + String code = mesUtils.transferCodeByPk(OrgVO.getDefaultTableName(), OrgVO.CODE, OrgVO.PK_ORG, pk_org); + if(mesUtils.checkIfIncludeOrg(code)) { + this.handleEventTwo(agg); + } } private void replMaterialOidFill(BomReplVO replVO) {