泛微系统里未执行完流程查询脚本

查询系统中未执行完的流程目前停留在谁哪里,停留多长时间。

select
hr.lastname approver
,wn.nodename
,wb.workflowname
--,wc.isremark
,wr.requestname
,hr.email
,wr.lastoperatedate
,DATEDIFF(day,wr.lastoperatedate,getdate()) delayday
--,wr.*
from
workflow_currentoperator wc
join HrmResource hr on wc.userid = hr.id
join workflow_nodebase wn on wc.nodeid = wn.id
join workflow_base wb on wc.workflowid = wb.id
join workflow_requestbase wr on wc.requestid = wr.requestid
where
wn.isstart = 0 --非开始
and wn.isend = 0 --非归档
and wc.isremark not in('2','8','4','1') --2提交;8抄送;4-抄送不提交
and wr.deleted = 0

转载于:https://www.cnblogs.com/celia0208/p/9927614.html

你可能感兴趣的:(泛微系统里未执行完流程查询脚本)