t.TaskDefinitionKey as UserTaskId,t.Name as UserTaskName,t.version ,count(1) as Cnt from
(select t1.TaskId as Id, t1.DefinitionId as ProcessDefinitionId, t1.DefinitionName as ProcessDefinitionName, t1.DefinitionKey as ProcessDefinitionKey, t1.InstanceId as ProcessInstanceId,
t1.TaskName as Name, t1.TaskDefinitionKey, t1.BusinessKey as ProcessInstanceBusinessKey, t1.Description, t1.CreateTime,version from
...
...
@@ -36,7 +36,7 @@
<where><iftest="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
) t
group by t.ProcessDefinitionId,t.ProcessDefinitionKey,t.ProcessDefinitionName,t.TaskDefinitionKey,t.Name ,t.version order by t.ProcessDefinitionKey, t.version desc, t.TaskDefinitionKey
group by t.ProcessDefinitionKey,t.ProcessDefinitionName,t.TaskDefinitionKey,t.Name ,t.version order by t.ProcessDefinitionKey, t.version desc, t.TaskDefinitionKey