更新审批时效排行榜SQL - 查询已关闭的用户
This commit is contained in:
parent
abbea8026b
commit
a12e01992f
@ -50,15 +50,17 @@
|
||||
<!-- 根据用户分组,统计查询平均审批耗时最长Top10 数据包括已完成数据和平均耗时 -->
|
||||
<select id="getUserProcessTpo10"
|
||||
resultType="cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessFinishStatisticsRespVO">
|
||||
SELECT assignee_user_id as userId,
|
||||
SELECT a.assignee_user_id as userId,
|
||||
COUNT(*) as finfishCount,
|
||||
(SUM(UNIX_TIMESTAMP(end_time) - UNIX_TIMESTAMP(create_time))/60) /count(*) as userTime
|
||||
FROM bpm_task_ext
|
||||
WHERE end_time IS NOT NULL
|
||||
AND reason != '自动审批'
|
||||
AND deleted = FALSE
|
||||
AND process_definition_id like 'oa_%'
|
||||
GROUP BY assignee_user_id order by userTime desc limit 0, 10
|
||||
(SUM(UNIX_TIMESTAMP(a.end_time) - UNIX_TIMESTAMP(a.create_time))/60) /count(*) as userTime
|
||||
FROM bpm_task_ext a
|
||||
left join system_users b on a.assignee_user_id = b.id
|
||||
WHERE a.end_time IS NOT NULL
|
||||
AND a.reason != '自动审批'
|
||||
AND a.deleted = FALSE
|
||||
AND a.process_definition_id like 'oa_%'
|
||||
AND b.status = 0
|
||||
GROUP BY a.assignee_user_id order by userTime desc limit 0, 10
|
||||
</select>
|
||||
|
||||
<select id="selectUnfinishProcessCount"
|
||||
|
Loading…
Reference in New Issue
Block a user