1. 程式人生 > >泛微系統裡未執行完流程查詢指令碼

泛微系統裡未執行完流程查詢指令碼

查詢系統中未執行完的流程目前停留在誰哪裡,停留多長時間。

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