diff --git a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md index 08ed76aa..fc3758d9 100644 --- a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md +++ b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md @@ -905,7 +905,7 @@ end. > 2. 从业务对象中提取工作流ID( `WFId`) > 3. 构建动态 `SQL` 语句,将指定工作流相关的文档状态更新为"已归档"(`stat=4`) > 4. 同时记录归档时间(使用系统当前时间) -> 5. 通过 `shiExeSql` 执行数据库更新操作,将 +> 5. 通过 `shiExeSql` 执行数据库更新操作,将文件标记为归档,并写入归档时间 ```delphi uses @@ -941,4 +941,10 @@ begin // 执行生成的SQL语句 shiExeSql(strSql); end. +``` + +如果是对物料进行操作,则用如下语句: + +```delphi +update pdmitem set stat = 4,archivedtime = ''%s'' from cfwfobj a,pdmitem b where a.wfid = %d and a.objtypeid = 21 and a.objid = b.itemid; ``` \ No newline at end of file