流程耗时报表

select k.requestid,k.sqr,k.sqrbm,k.sqbdh,k.xmmc,k.直接leader审批耗时,k.FIN审批耗时,k.FIN退回审批耗时,k.FIN退回次数,
k.Compliance审批耗时,k.Compliance退回审批耗时,k.Compliance退回次数,k.激励项目组审批耗时,k.董事会审批耗时,k.副CFO审批耗时,
k.VAST审批耗时,k.MAC审批耗时,k.申请人准备材料耗时,(k.CRO+k.GC+k.COO+k.CFO+k.BU) as 'CET审批耗时',k.印章管理员盖章耗时,
k.申请人提交函件耗时,k.财务部提交PC耗时,k.流程总耗时,k.流程状态,k.归档日期
from (select  w.requestid,f1.sqr,f1.sqrbm,f1.sqbdh,f1.xmmc,(select sum(t.hour) from (select DISTINCT a.id, FORMAT(TIMESTAMPDIFF(SECOND ,STR_TO_DATE(concat( a.receivedate,' ', a.receivetime),'%Y-%m-%d %H:%i:%s'),STR_TO_DATE(concat( a.operatedate,' ', a.operatetime),'%Y-%m-%d %H:%i:%s'))/3600,2) as HOUR 
from workflow_currentoperator a 
inner join workflow_requestlog b on a.requestid=b.requestid and a.nodeid=b.nodeid and b.logtype in (0,2) and a.userid=b.operator and b.OPERATETIME=a.OPERATETIME
inner join formtable_main_153 f on a.requestid=f.requestid where a.nodeid=1879 and a.requestid=w.requestid)  t) as '直接leader审批耗时',
(select sum(t.hour) from (select DISTINCT a.id, FORMAT(TIMESTAMPDIFF(SECOND ,STR_TO_DATE(concat( a.receivedate,' ', a.receivetime),'%Y-%m-%d %H:%i:%s'),STR_TO_DATE(concat( a.operatedate,' ', a.operatetime),'%Y-%m-%d %H:%i:%s'))/3600,2) as HOUR 
from workflow_currentoperator a 
inner join workflow_requestlog b on a.requestid=b.requestid and a.nodeid=b.nodeid and b.logtype in (0,2) and a.userid=b.operator and b.OPERATETIME=a.OPERATETIME
inner join formtable_main_153 f on a.requestid=f.requestid where a.nodeid=1880 and a.requestid=w.requestid)  t) as 'FIN审批耗时',
(select  FORMAT(sum(TIMESTAMPDIFF(SECOND ,STR_TO_DATE(concat( a.receivedate,' ', a.receivetime),'%Y-%m-%d %H:%i:%s'),STR_TO_DATE(concat( a.operatedate,' ', a.operatetime),'%Y-%m-%d %H:%i:%s')))/3600,2) as HOUR 
from workflow_currentoperator a 
inner join workflow_requestlog b on a.requestid=b.requestid and a.nodeid=b.nodeid  and b.logtype in (3) and a.userid=b.operator and b.OPERATETIME=a.OPERATETIME
inner join formtable_main_153 f on a.requestid=f.requestid where a.nodeid=1880 and a.requestid=w.requestid)  as 'FIN退回审批耗时'  ,
(select count(a.id) as HOUR 
from workflow_currentoperator a 
inner join workflow_requestlog b on a.requestid=b.requestid and a.nodeid=b.nodeid  and b.logtype in (3) and a.userid=b.operator and b.OPERATETIME=a.OPERATETIME
inner join formtable_main_153 f on a.requestid=f.requestid where a.nodeid=1880 and a.requestid=w.requestid)  as 'FIN退回次数'  ,
(select sum(t.hour) from (select DISTINCT a.id, 
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值