– 已经事宜
select distinct t1.requestid, t1.createdate, t1.createtime,t1.creater, t1.creatertype, t1.workflowid,
t1.requestname, t1.status,t1.requestlevel,t1.currentnodeid,t2.viewtype,t2.receivedate,
t2.receivetime,t2.operatedate,t2.operatetime,t2.isremark,t2.nodeid,t2.agentorbyagentid,t2.agenttype
from workflow_requestbase t1,workflow_currentoperator t2
where t1.requestid = t2.requestid
and t2.userid = 2881 – 用户ID
and t1.workflowid in(521,76522) – 流程ID
– 下面这些条件没有仔细研究过,我也不知道分别有什么作用,只知道这样可以查到已办事宜
and t2.usertype=0 – 用户类型,1为普通用户,2为客户
and t2.isremark in(2,4)
and t2.iscomplete=1
and t2.islasttimes=1
– 按时间倒序
order by t2.operatedate Desc ,t2.operatetime Desc
– 待办事宜
select distinct t1.requestid, t1.createdate, t1.createtime,t1.creater, t1.creatertype,
t1.workflowid, t1.requestname, t1.status,t1.requestlevel,t1.currentnodeid,t2.viewtype,
t2.receivedate,t2.receivetime,t2.isremark,t2.nodeid,t2.agentorbyagentid,t2.agenttype
from workflow_requestbase t1,workflow_currentoperator t2
where t1.requestid = t2.requestid
and t2.userid = 1 – 用户ID
and t1.workflowid in(301) – 流程ID
– 下面这些条件没有仔细研究过,我也不知道分别有什么作用,只知道这样可以查到待办事宜
and t2.usertype=0 – 用户类型,1为普通用户,2为客户
and t2.isremark in( ‘0’,‘1’,‘5’,‘8’,‘9’,‘7’)
and t2.islasttimes=1
– 按时间倒序
order by t2.receivedate ,t2.receivetime Desc
– 办结事宜
select distinct t1.requestid, t1.createdate, t1.createtime,t1.creater, t1.creatertype, t1.workflowid,
t1.requestname, t1.status,t1.requestlevel,t1.currentnodeid,t2.viewtype,t2.receivedate,t2.receivetime,
t2.isremark,t2.nodeid,t2.agentorbyagentid,t2.agenttype
from workflow_requestbase t1,workflow_currentoperator t2
where t1.requestid = t2.requestid
and t2.userid = 120 – 用户ID
and t1.workflowid in(93) – 流程ID
– 下面这些条件没有仔细研究过,我也不知道分别有什么作用,只知道这样可以查到l办结事宜
and t2.usertype=0 – 用户类型,1为普通用户,2为客户
and t2.isremark in(‘2’,‘4’)
and t1.currentnodetype = ‘3’
and iscomplete=1
and islasttimes=1
– 按时间倒序
order by t2.receivedate ,t2.receivetime Desc