|
|
Q:现做项目,需要实现一个类似流程历史的功能,能否提供平台目前已实现的流程历史sql以供参考?
A:可以的。流程历史实现sql类似于:- select a.actiontime 审批时间,a.startnodename 流程状态,(select name from t_user where id=b.auditor) 审批人 ,a.attitude 备注 from (select row_number() over () num,actiontime,startnodename,attitude from T_RELATIONHIS where docid='11e0-fa2c-30cb7577-a62d-31678517272d' and startnodename<>'开始') a,(select row_number() over () num,auditor from T_RELATIONHIS where docid='11e0-fa2c-30cb7577-a62d-31678517272d' and auditor is not null) b where a.num=b.num and b.auditor is not null order by a.ACTIONTIME desc
复制代码 |
|