From 0add4db4758eeea5c4dc7836c114a72684fb6785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=98=8E?= <125556714+Topfunplus@users.noreply.github.com> Date: Fri, 23 May 2025 10:45:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor(mes):=20=E4=BC=98=E5=8C=96=E9=94=80?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95=E5=92=8C=E9=87=87=E8=B4=AD=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=E5=8D=95=E7=9A=84=20MES=20=E5=90=8C=E6=AD=A5=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在销售订单同步中添加了对 BIP --- .../ic/m45/sign/rule/PurchaseReceiptRuleMES.java | 4 ++-- .../AfterApprovingSynchronizeRuleMES.java | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ic/src/private/nc/bs/ic/m45/sign/rule/PurchaseReceiptRuleMES.java b/ic/src/private/nc/bs/ic/m45/sign/rule/PurchaseReceiptRuleMES.java index 05b17d6..2928af6 100644 --- a/ic/src/private/nc/bs/ic/m45/sign/rule/PurchaseReceiptRuleMES.java +++ b/ic/src/private/nc/bs/ic/m45/sign/rule/PurchaseReceiptRuleMES.java @@ -177,8 +177,8 @@ public class PurchaseReceiptRuleMES implements IRule { String supplyId = transferCodeByPk(SupplierVO.getDefaultTableName(), SupplierVO.CODE, SupplierVO.PK_SUPPLIER, head.getCvendorid()); data.put("supplyId", supplyId); - // ID - ȷӳ - data.put("currency", null); + // - ȷӳ + data.put("currency", "CNY"); //ʣ data.put("rate", 1); // 㷽ʽ - ĬΪ"S"(ת) diff --git a/so/src/private/nc/bs/so/m30/rule/approve/AfterApprovingSynchronizeRuleMES.java b/so/src/private/nc/bs/so/m30/rule/approve/AfterApprovingSynchronizeRuleMES.java index 3c8ada3..67db0b0 100644 --- a/so/src/private/nc/bs/so/m30/rule/approve/AfterApprovingSynchronizeRuleMES.java +++ b/so/src/private/nc/bs/so/m30/rule/approve/AfterApprovingSynchronizeRuleMES.java @@ -3,6 +3,7 @@ package nc.bs.so.m30.rule.approve; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import nc.bs.dao.BaseDAO; +import nc.bs.framework.common.InvocationInfoProxy; import nc.bs.framework.common.NCLocator; import nc.bs.logging.Log; import nc.impl.pubapp.pattern.rule.IRule; @@ -45,9 +46,16 @@ public class AfterApprovingSynchronizeRuleMES implements IRule { @Override public void process(SaleOrderVO[] saleOrderVOs) { + // ʼHTTP󹤾 + IHttpPostOtherSys httpPostOtherSys = NCLocator.getInstance().lookup(IHttpPostOtherSys.class); try { - // ʼHTTP󹤾 - IHttpPostOtherSys httpPostOtherSys = NCLocator.getInstance().lookup(IHttpPostOtherSys.class); +// String code = InvocationInfoProxy.getInstance().getUserCode(); + // ǰԱBIPʱ ֱreturn ͬMESҵ߼ +// if (code != null && code.equals("BIP")) { +// obmlog.debug("AfterApprovingSynchronizeRuleMES-ǰԱBIP"); +// return; +// } + if (saleOrderVOs == null || saleOrderVOs.length == 0) { obmlog.debug("AfterApprovingSynchronizeRuleMES-ûҪ۶"); return; @@ -140,6 +148,7 @@ public class AfterApprovingSynchronizeRuleMES implements IRule { if (bodys != null) { for (SaleOrderBVO body : bodys) { JSONObject detailItem = new JSONObject(); + detailItem.put("productNum", head.getVbillcode()); // ֶҪֶ // dreceivedate UFDate dreceivedate = body.getDreceivedate(); @@ -187,7 +196,8 @@ public class AfterApprovingSynchronizeRuleMES implements IRule { detailItem.put("deliveryDate", dsenddate1 != null ? dsenddate1.toString().substring(0, 10) : null); // DZֶΪnull detailItem.put("productNum", null); - detailItem.put("factoryId", null); + // ݵ¹˾֯ + detailItem.put("factoryId", transferCodeByPk(SalesOrgVO.getDefaultTableName(), SalesOrgVO.CODE, SalesOrgVO.PK_SALESORG, head.getPk_org())); detailItem.put("customMtId", null); detailItem.put("customNo", null); detailItem.put("customSN", null);