From a5939dd404aca7060372e873bd9cc0b58430e707 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 24 Dec 2025 02:17:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A=E9=82=B9?= =?UTF-8?q?=E6=B1=9F=E6=B6=9B=20=E6=8F=90=E4=BA=A4=E6=97=B6=E9=97=B4?= =?UTF-8?q?=EF=BC=9A2025=E5=B9=B412=E6=9C=8824=E6=97=A5=20=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=86=85=E5=AE=B9=EF=BC=9A=E4=BF=9D=E5=AD=98=E6=9A=82?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/plugin/form/SaveAndTemporarily.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/SaveAndTemporarily.java diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/SaveAndTemporarily.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/SaveAndTemporarily.java new file mode 100644 index 0000000..1a017c3 --- /dev/null +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/SaveAndTemporarily.java @@ -0,0 +1,25 @@ +package shkd.sys.sys.plugin.form; + +import kd.bos.bill.AbstractBillPlugIn; +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.form.events.AfterDoOperationEventArgs; +import kd.bos.servicehelper.operation.SaveServiceHelper; +import kd.sdk.plugin.Plugin; + +import java.util.EventObject; + +/** + * 动态表单插件 + */ +public class SaveAndTemporarily extends AbstractBillPlugIn implements Plugin { + @Override + public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) { + super.afterDoOperation(afterDoOperationEventArgs); + String operateKey = afterDoOperationEventArgs.getOperateKey(); + if ("save".equals(operateKey)) { + DynamicObject dataEntity = this.getModel().getDataEntity(true); + dataEntity.set("status", "A"); + SaveServiceHelper.save(new DynamicObject[]{dataEntity}); + } + } +} \ No newline at end of file