From 1141cd4a704900db0db2d6896c6e980f8b33ad49 Mon Sep 17 00:00:00 2001 From: LanHeron Date: Fri, 5 Sep 2025 09:27:05 +0800 Subject: [PATCH] vault backup: 2025-09-05 09:27:05 --- SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md index a9f3008c..6ea867fa 100644 --- a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md +++ b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md @@ -900,6 +900,18 @@ end. 将过程设置为普通过程,在提交后的事件里写入归档文件脚本,实现该过程提交后,文件归档的操作 +作用说明: + +1. 通过 `shiCurBizObj` 获取当前业务对象 + +2. 从业务对象中提取工作流ID( `WFId`) + +3. 构建动态 `SQL` 语句,将指定工作流相关的文档状态更新为"已归档"(`stat=4`) + +4. 同时记录归档时间(使用系统当前时间) + +5. 通过 `shiExeSql` 执行数据库更新操作 + ```delphi uses Classes, SHostIntf, ThreadContextMan, IntfKernel, EntClas, CommonFunc, DataConst, DBIntf,