From 6c105bd87cbf8b9ac90211f10c0b15f6e4f7b6b0 Mon Sep 17 00:00:00 2001 From: chenshaoxin <1981897232@qq.com> Date: Tue, 17 Jun 2025 10:25:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A=E9=99=88?= =?UTF-8?q?=E7=BB=8D=E9=91=AB=20=E6=97=A5=E6=9C=9F=EF=BC=9A2025/6/17=2010?= =?UTF-8?q?=EF=BC=9A00=20=E5=86=85=E5=AE=B9:=E5=8D=95=E6=8D=AE=E4=B8=8B?= =?UTF-8?q?=E6=8E=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/other/CasRecbillBOTPPlugin.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/other/CasRecbillBOTPPlugin.java diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/other/CasRecbillBOTPPlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/other/CasRecbillBOTPPlugin.java new file mode 100644 index 0000000..2899c11 --- /dev/null +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/other/CasRecbillBOTPPlugin.java @@ -0,0 +1,65 @@ +package shkd.sys.sys.plugin.other; + +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.entity.BillEntityType; +import kd.bos.entity.ExtendedDataEntity; +import kd.bos.entity.ExtendedDataEntitySet; +import kd.bos.entity.botp.plugin.AbstractConvertPlugIn; +import kd.bos.entity.botp.plugin.args.AfterConvertEventArgs; +import kd.bos.entity.botp.plugin.args.AfterCreateLinkEventArgs; +import kd.bos.entity.botp.plugin.args.AfterCreateTargetEventArgs; +import kd.bos.entity.botp.plugin.args.AfterFieldMappingEventArgs; + +import java.util.List; + +public class CasRecbillBOTPPlugin extends AbstractConvertPlugIn { + + /** + * 创建目标单据数据包后事件 + * + * @param e + * @remark + * 这个事件,只在下推时触发,把根据分单规则创建好的目标单,传递给插件 + */ + @Override + public void afterCreateTarget(AfterCreateTargetEventArgs e) { + System.out.println(666); + } + + /** + * 目标字段赋值完毕后事件 + * + * @param e + * @remark + * 插件可以在此基础上,继续填写目标字段值 + */ + @Override + public void afterFieldMapping(AfterFieldMappingEventArgs e) { + System.out.println(666); + } + + + /** + * 记录关联关系后事件 + * + * @param e + * @remark + * 根据系统自动记录的关联关系,进行相关数据的同步携带,如携带其他子单据体数据 + */ + @Override + public void afterCreateLink(AfterCreateLinkEventArgs e) { + System.out.println(); + } + + @Override + public void afterConvert(AfterConvertEventArgs e) { + super.afterConvert(e); + BillEntityType tgtMainType = this.getTgtMainType(); + ExtendedDataEntitySet targetExtDataEntitySet = e.getTargetExtDataEntitySet(); + List cas_recbill = targetExtDataEntitySet.getExtDataEntityMap().get("cas_recbill"); + for (ExtendedDataEntity extendedDataEntity : cas_recbill) { + DynamicObject dataEntity = extendedDataEntity.getDataEntity(); + dataEntity.set("shkd_zdxtid","true"); + } + } +}