select rb.requestid,rb.`REQUESTNAME`,
r2.LASTNAME,c.isremark,
cast(CONCAT(RECEIVEDATE,' ',RECEIVETIME) as datetime) '接收时间',
cast(CONCAT(OPERATEDATE,' ',OPERATETIME) as datetime) '处理时间',
cast(CONCAT(firstviewdate,' ',firstviewtime) as datetime) '首次查看',
timediff(cast(CONCAT(firstviewdate,' ',firstviewtime) as datetime), cast(CONCAT(RECEIVEDATE,' ',RECEIVETIME) as datetime)) '查看间隔',
timediff(cast(CONCAT(OPERATEDATE,' ',OPERATETIME) as datetime), cast(CONCAT(RECEIVEDATE,' ',RECEIVETIME) as datetime)) '处理耗时'
from workflow_currentoperator C
join workflow_requestbase rb on c.requestid = rb.requestid
LEFT JOIN hrmresource r2 on c.userid = r2.ID
where c.WORKFLOWID = 93 and nodeid = 699
and firstviewdate is not null
order by c.RECEIVEDATE DESC
-- 取全部流程模型
select * from workflow_base where ISVALID = 1
-- 取流程节点信息
select * from workflow_nodebase n join workflow_flownode f on f.nodeid = n.id where WORKFLOWID = 93