From 27aefc328d6b841114213e4821cf4000616fc752 Mon Sep 17 00:00:00 2001 From: maolei Date: Thu, 19 Jun 2025 14:58:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Bom:=20=E4=BF=AE=E6=94=B9=20BOM=20=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -增加排除用户和金思维 MES 同步组织的判断逻辑 - 对不同情况执行相应的保存处理逻辑 - 优化异常处理,确保错误信息正确记录 --- .../mmbd/bom/APIBomBusinessServiceImpl.java | 56 ++++++++++++++++++- 1 file changed, 54 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 7efe53a..485c686 100644 --- a/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java +++ b/uapbd/src/private/nccloud/api/impl/mmbd/bom/APIBomBusinessServiceImpl.java @@ -199,9 +199,61 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService { } return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "100999", "BOMύɹֳɹʧ", true); - }else{ - ExceptionUtils.wrappBusinessException("δƥ䵽עû˺š"+userCode+"飡"); + } else { + try { + IHttpPostOtherSys httpPostOtherSys = NCLocator.getInstance().lookup(IHttpPostOtherSys.class); + + // 鵱ǰûǷΪųû + if (httpPostOtherSys.checkIfExcludeUser()) { + // ųûֱִͬͨ߼ + for (AggBomVO aggvo : commitAggvoList) { + result = service.insertBom(new AggBomVO[] { aggvo }); + newAggVOList.add(result[0]); + } + return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "BOMɹ(ųû)"); + } + + // 鵱ǰ֯Ƿڽ˼άMESͬ֯(֯) + String currentOrgCode = this.orgCodeFlag; + boolean isIncludeOrg = httpPostOtherSys.checkIfIncludeOrg(currentOrgCode); + + if (isIncludeOrg) { + // ڽ˼άMESִͬ֯⴦߼ + for (AggBomVO aggvo : commitAggvoList) { + result = service.insertCommitBomWithParam(new AggBomVO[] { aggvo }, true, true); + newAggVOList.add(result[0]); + } + return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "BOMɹ(˼άMESͬ֯)"); + } else { + // ڽ˼άMESִͬ֯Ĭϴ߼ + for (AggBomVO aggvo : commitAggvoList) { + try { + result = service.insertCommitBomWithParam_RequiresNew(new AggBomVO[] { aggvo }, true, true); + newAggVOList.add(result[0]); + } catch (Exception e) { + if (e.getMessage() != null) { + if (e.getMessage().length() > 100) { + aggvo.getParent().setAttributeValue("hvdef2", e.getMessage().substring(0, 100)); + } else { + aggvo.getParent().setAttributeValue("hvdef2", + e.getMessage().substring(0, e.getMessage().length() - 1)); + } + } else { + Throwable unmarsh = ExceptionUtils.unmarsh(e); + aggvo.getParent().setAttributeValue("hvdef2", "쳣" + unmarsh.getMessage()); + } + newAggVOList.add(aggvo); + } + } + return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "100999", + "BOMύɹֳɹʧ", true); + } + } catch (BusinessException e) { + // HTTPʧʱ˵ԭе쳣 + ExceptionUtils.wrappBusinessException("HTTPжʧܣ" + e.getMessage() + "δƥ䵽עû˺š"+userCode+"飡"); + } } + } else { return ResultMessageUtil.exceptionToJSON("BOMʧ,״̬ɻ߿պͨͬʱ", "999"); } From d9e292fb139800fe45f3baf413ec7b602fcfb450 Mon Sep 17 00:00:00 2001 From: mzr Date: Thu, 19 Jun 2025 15:40:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=B0=E8=B4=A6=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=8E=A8=E9=80=81=E8=B0=83=E6=95=B4=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=90=8D-bankrelatedCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/cmp/informer/informer/action/myBtnClickAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmp/src/client/nccloud/web/cmp/informer/informer/action/myBtnClickAction.java b/cmp/src/client/nccloud/web/cmp/informer/informer/action/myBtnClickAction.java index 1fea126..fa243e8 100644 --- a/cmp/src/client/nccloud/web/cmp/informer/informer/action/myBtnClickAction.java +++ b/cmp/src/client/nccloud/web/cmp/informer/informer/action/myBtnClickAction.java @@ -232,7 +232,7 @@ public class myBtnClickAction extends InformerAction implements ICommonAction { vmao.put("paymentMethod", "10"); } vmao.put("sourceId", row.get("pk_informer")); - vmao.put("bankrelated_code", row.get("bankrelated_code")); + vmao.put("bankrelatedCode", row.get("bankrelated_code")); lists.add(vmao); }