From 3cad4fdf2db0e96b6c5b33183664df50cf20d13d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=98=8E?= <125556714+Topfunplus@users.noreply.github.com> Date: Thu, 29 May 2025 18:11:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E6=89=B9=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除直接调用 PfServiceScmUtil.processBatch 方法 - 使用 IPfExchangeService 接口进行数据转换 - 增加转换结果的空判断和日志记录 - 引入必要的类和接口 --- .../pu/m21/plugin/BatchTransferToPurchaseOrder.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pu/src/private/nc/bs/pu/m21/plugin/BatchTransferToPurchaseOrder.java b/pu/src/private/nc/bs/pu/m21/plugin/BatchTransferToPurchaseOrder.java index 4d80136..72c62e5 100644 --- a/pu/src/private/nc/bs/pu/m21/plugin/BatchTransferToPurchaseOrder.java +++ b/pu/src/private/nc/bs/pu/m21/plugin/BatchTransferToPurchaseOrder.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import nc.bs.framework.common.NCLocator; import nc.bs.logging.Log; import nc.bs.pub.common.PfServiceScmUtil; import nc.bs.pub.pa.PreAlertObject; @@ -13,6 +14,7 @@ import nc.bs.pub.taskcenter.IBackgroundWorkPlugin; import nc.bs.pubapp.AppBsContext; import nc.impl.pubapp.pattern.data.vo.VOQuery; import nc.impl.pubapp.pattern.page.db.IDDBPage; +import nc.itf.uap.pf.IPfExchangeService; import nc.util.mmf.framework.base.MMArrayUtil; import nc.util.mmf.framework.db.MMSqlBuilder; import nc.vo.pu.m20.entity.PraybillHeaderVO; @@ -21,7 +23,9 @@ import nc.vo.pu.m20.entity.PraybillVO; import nc.vo.pu.m21.entity.OrderItemVO; import nc.vo.pu.m21.entity.OrderVO; import nc.vo.pub.BusinessException; +import nc.vo.pub.compiler.PfParameterVO; import nc.vo.pubapp.pattern.exception.ExceptionUtils; +import nc.vo.scmpub.res.billtype.POBillType; public class BatchTransferToPurchaseOrder implements IBackgroundWorkPlugin { private static final Log logger = Log.getInstance("devpoordertask"); @@ -199,8 +203,13 @@ public class BatchTransferToPurchaseOrder implements IBackgroundWorkPlugin { bvo[j].setCrowno(String.valueOf(rowNum)); } } - PfServiceScmUtil.processBatch("SAVEBASE", "21", orderVOs, null, null); + IPfExchangeService service = NCLocator.getInstance().lookup(IPfExchangeService.class); + OrderVO[] transVos = (OrderVO[]) service.runChangeDataAry("20", "21", orderVOs, null); + if (transVos == null || transVos.length <= 0) { + logger.info("תʱ,VOΪ", this.getClass(), "processBatchTransfer"); + } logger.info("ɹ", this.getClass(), "processBatchTransfer"); + } else { logger.warn("תδκβɹ", this.getClass(), "processBatchTransfer"); }