ECOLOGY9.0查询流程经过节点的详细信息

select

w.workflowid,

w.requestid,

w.requestname,

w.requestmark,

CONVERT(char(11),w.createdate,120)+CONVERT(char(12),w.createtime,114) as 'createdate',

h.lastname,

c.groupid,

t.typename,

n.nodename,

CONVERT(char(11),c.receivedate,120)+CONVERT(char(12),c.receivetime,114) as 'receivedate',

CONVERT(char(11),c.operatedate,120)+CONVERT(char(12),c.operatetime,114) as 'operatedate',

CAST(CAST(DATEDIFF(ss, receivedate, CONVERT(char(11),c.operatedate,120)+CONVERT(char(12),c.operatetime,114)) / (60*60*24) AS INT) AS VARCHAR) + '天'

  • CAST(CAST(DATEDIFF(ss, CONVERT(char(11),c.receivedate,120)+CONVERT(char(12),c.receivetime,114), CONVERT(char(11),c.operatedate,120)+CONVERT(char(12),c.operatetime,114)) % 86400 / 3600 AS INT) AS VARCHAR) + '小时'

  • CAST(CAST(DATEDIFF(ss, CONVERT(char(11),c.receivedate,120)+CONVERT(char(12),c.receivetime,114), CONVERT(char(11),c.operatedate,120)+CONVERT(char(12),c.operatetime,114)) % 3600 / 60 AS INT) AS VARCHAR) + '分'

  • CAST(CAST(DATEDIFF(ss, CONVERT(char(11),c.receivedate,120)+CONVERT(char(12),c.receivetime,114), CONVERT(char(11),c.operatedate,120)+CONVERT(char(12),c.operatetime,114)) % 60 AS INT) AS VARCHAR) + '秒' AS 'SpendTime'

from workflow_requestbase w

inner join workflow_currentoperator c

on w.requestid=c.requestid

inner join hrmresource h

on c.userid=h.id

inner join workflow_nodebase n

on c.nodeid=n.id

inner join workflow_type t

on c.workflowtype=t.id

and w.workflowid in

(select wfversionid from workflow_versionInfo where wfid=573)

-- and w.requestid=606859

-- order by groupid

相关推荐
程序员黑豆4 小时前
Java 注释详解:单行、多行与文档注释的完整指南
java·前端·ai编程
hey_sml5 小时前
JAVA每日一学---CompletableFuture中thenApply与thenCompose区别详解
java·开发语言
Doraemomo5 小时前
数据结构-环形链表
java·数据结构·链表
萧瑟余晖7 小时前
Java深入解析篇十七之SpringCloud
java·开发语言
IvorySQL7 小时前
PostgreSQL 日报 | JOIN 与外键优化(8 月 9 日)
数据库·postgresql
是未才7 小时前
从输入 URL 到页面返回:DNS、路由、TLS 与 HTTP 完整链路
java·后端·计算机网络
ltl7 小时前
自治数据库十年回顾:Peloton、NoisePage、OtterTune 到云原生 auto-tuning
数据库
ttod_qzstudio7 小时前
Java 常用语法极简通关(五):类与对象——字段、方法、构造器、this 与 static
java·开发语言·python
萧瑟余晖9 小时前
Java深入解析篇十七之Spring Security
java·开发语言·spring
灯澜忆梦9 小时前
【MySQL10】进阶篇 | 索引_#2性能优化
数据库·sql·mysql·性能优化