From f166d392f3a632f934b3b85e61a9dc37a80fe1de Mon Sep 17 00:00:00 2001 From: "tanfengling@x-ri.com" <123456> Date: Wed, 5 Nov 2025 11:02:45 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=B3=9B=E5=BE=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E3=80=91=E5=85=B6=E4=BB=96=E5=87=BA=E5=BA=93=E5=BF=AB=E9=80=92?= =?UTF-8?q?=E5=8D=95=E5=8F=B7=E5=9B=9E=E4=BC=A0=E6=B3=9B=E5=BE=AE=EF=BC=8C?= =?UTF-8?q?=E4=BB=98=E6=AC=BE=E7=8A=B6=E6=80=81=E5=9B=9E=E4=BC=A0=E6=B3=9B?= =?UTF-8?q?=E5=BE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cas/PaymentbillPushPaystateOp.java | 12 +++++ .../operate/im/OtherOutPushExprnoOp.java | 51 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 lc123/cloud/app/plugin/operate/cas/PaymentbillPushPaystateOp.java create mode 100644 lc123/cloud/app/plugin/operate/im/OtherOutPushExprnoOp.java diff --git a/lc123/cloud/app/plugin/operate/cas/PaymentbillPushPaystateOp.java b/lc123/cloud/app/plugin/operate/cas/PaymentbillPushPaystateOp.java new file mode 100644 index 0000000..53625c2 --- /dev/null +++ b/lc123/cloud/app/plugin/operate/cas/PaymentbillPushPaystateOp.java @@ -0,0 +1,12 @@ +package tqq9.lc123.cloud.app.plugin.operate.cas; + +import kd.bos.entity.plugin.AbstractOperationServicePlugIn; +import kd.bos.entity.plugin.args.AfterOperationArgs; + +public class PaymentbillPushPaystateOp extends AbstractOperationServicePlugIn { + + @Override + public void afterExecuteOperationTransaction(AfterOperationArgs e) { + super.afterExecuteOperationTransaction(e); + } +} diff --git a/lc123/cloud/app/plugin/operate/im/OtherOutPushExprnoOp.java b/lc123/cloud/app/plugin/operate/im/OtherOutPushExprnoOp.java new file mode 100644 index 0000000..7b9bbab --- /dev/null +++ b/lc123/cloud/app/plugin/operate/im/OtherOutPushExprnoOp.java @@ -0,0 +1,51 @@ +package tqq9.lc123.cloud.app.plugin.operate.im; + +import com.alibaba.fastjson.JSONObject; +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.dataentity.entity.DynamicObjectCollection; +import kd.bos.entity.plugin.AbstractOperationServicePlugIn; +import kd.bos.entity.plugin.args.BeforeOperationArgs; +import kd.bos.servicehelper.BusinessDataServiceHelper; +import org.apache.commons.lang3.StringUtils; +import tqq9.lc123.cloud.app.plugin.utils.FWRestfulUtils; + +/** + * 其他出库单--按钮 tqq9_pushexprno + * 推送快递单号到泛微 + */ +public class OtherOutPushExprnoOp extends AbstractOperationServicePlugIn { + + @Override + public void beforeExecuteOperationTransaction(BeforeOperationArgs e) { + super.beforeExecuteOperationTransaction(e); + DynamicObject[] dataEntities = e.getDataEntities(); + for (DynamicObject dataEntity : dataEntities) { + dataEntity = BusinessDataServiceHelper.loadSingle(dataEntity.getPkValue(), dataEntity.getDynamicObjectType().getName(),"creator,tqq9_entrywl.tqq9_kddh,tqq9_fwrequestid,billno"); + DynamicObjectCollection wlEntries = dataEntity.getDynamicObjectCollection("tqq9_entrywl"); + String kddh = ""; + for (DynamicObject entity : wlEntries) { + String tqq9_kddh = entity.getString("tqq9_kddh"); + kddh = kddh + "," + tqq9_kddh; + } + if(StringUtils.isNotBlank(kddh)){ + kddh = kddh.substring(1); + }else{ + continue; + } + + String billno = dataEntity.getString("billno"); + String tqq9_fwrequestid = dataEntity.getString("tqq9_fwrequestid"); + JSONObject mainTable = new JSONObject(); + mainTable.put("lcid", tqq9_fwrequestid); + mainTable.put("kddh", kddh); + + DynamicObject creator = dataEntity.getDynamicObject("creator"); + creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(),"bos_user"); + String tqq9_fwuserid = creator.getString("tqq9_fwuserid"); + + FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); + String resultStr = fwRestfulUtils.pushData(mainTable, tqq9_fwuserid, billno, "im_otheroutbill"); + } + + } +}