From 174210024262cbc36241f5e38b53e90b72d8098a 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, 14 May 2025 21:19:48 +0800 Subject: [PATCH] =?UTF-8?q?gaoningbom=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=90=E5=A5=97=E5=85=AC=E5=8F=B8=E9=80=BB?= =?UTF-8?q?=E8=BE=91=5F=E4=B8=89=E6=96=B9=E5=BA=94=E7=94=A8=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=94=A8=E6=88=B7=E4=BC=9A=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/mmbd/bom/APIBomBusinessServiceImpl.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 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 5812af9..b781f31 100644 --- a/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java +++ b/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java @@ -88,6 +88,8 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { private static Map tsMap = new HashMap(); + private String orgCodeFlag =null; + private static Map voMap = new HashMap(); private static Map> idsMap = new HashMap(); @@ -112,7 +114,11 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { list.add(agg); } AggBomVO[] aggVOs = (AggBomVO[]) list.toArray(new AggBomVO[list.size()]); - + if(aggVOs[0].getParentVO().getAttributeValue("pk_org")==null||aggVOs[0].getParentVO().getAttributeValue("pk_org")==""){ + ExceptionUtils.wrappBusinessException("请求参数pk_org为空,请检查!!!!"); + }else{ + this.orgCodeFlag=aggVOs[0].getParentVO().getAttributeValue("pk_org").toString(); + } BillFieldsCodeToPkUtil.doTranslateVOFields(aggVOs); IUifService iUifService = NCLocator.getInstance().lookup(IUifService.class); for (AggBomVO aggtwo : aggVOs) { @@ -170,7 +176,7 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { result = service.insertBom((AggBomVO[]) addAggvoList.toArray(new AggBomVO[0])); } else if (!commitAggvoList.isEmpty() && addAggvoList.isEmpty()) { List newAggVOList = new ArrayList<>(); - if ("gaoning".equals(userCode)) { + if ("gaoning".equals(userCode)|| "C029".equals(orgCodeFlag)) { for (AggBomVO aggvo : commitAggvoList) { result = service.insertCommitBomWithParam(new AggBomVO[] { aggvo }, true, true); newAggVOList.add(result[0]); @@ -720,7 +726,7 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { if (VersionTypeEnum.AVAILABLE.equalsValue(head.getHfversiontype()) && !head.getCbomid().equals(headvo.getCbomid())) { // sdlizheng --添加独立判断--plm三方越过此校验 - if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode)) { + if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode)|| "C029".equals(this.orgCodeFlag)) { // AggBomVO afterVO = service.canceldefault(aggBomVO); } else { return UFBoolean.TRUE; @@ -774,14 +780,14 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { 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)) { + if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode)|| "C029".equals(this.orgCodeFlag)) { // sdlizheng // 1、对于之前不存在的BOM,新增时:如果是传自由态,不默认且无效,走标准逻辑,如果传的是审批态默认且有效。2025年4月11日16点28分 start if (fbillstatus != null && "1".equals(fbillstatus.toString())) { agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1)); agg.getParent().setAttributeValue("hbdefault", UFBoolean.TRUE); }else if(fbillstatus != null && "-1".equals(fbillstatus.toString())){ - if("gaoning".equals(userCode)){ + if("gaoning".equals(userCode)|| "C029".equals(this.orgCodeFlag)){ agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1)); agg.getParent().setAttributeValue("hbdefault", UFBoolean.TRUE); }