{"sql":"select bwf.id                      as 流程任务id,\n       bwf.activityName            as 任务节点名称,\n       bwf.participant             as 任务处理人id,\n       bwf.startTime               as 任务接收时间,\n       bwf.receiveTime             as 任务处理时间,\n       wh.workflowName             as 流程模板名称,\n       hap.name                    as 所属应用名称,\n       hap.code                    as 所属应用编码,\n       hou.departmentId            as 任务处理人部门id,\n       hbc1.cnt                    as 传阅次数,\n       hbc2.cnt                    as 协办次数,\n       hbc3.cnt                    as 加签次数,\n       bwf.originatorDeptQueryCode as 部门查询字段\nfrom biz_workitem_finished bwf\n         left join biz_workflow_instance bwi on bwf.instanceId = bwi.id\n         left join h_workflow_header wh on bwf.workflowCode = wh.workflowCode\n         left join h_app_package hap on bwf.appCode = hap.code\n         left join h_org_user hou on bwf.participant = hou.id\n         left join(select workItemId, count(*) as cnt\n                   from h_biz_comment\n                   where actionType = 'CIRCULATE'\n                   group by workItemId) hbc1 on bwf.id = hbc1.workItemId\n         left join(select workItemId, count(*) as cnt\n                   from h_biz_comment\n                   where actionType = 'ASSIST'\n                   group by workItemId) hbc2 on bwf.id = hbc2.workItemId\n         left join(select workItemId, count(*) as cnt\n                   from h_biz_comment\n                   where actionType = 'ADD_WORKITEM'\n                   group by workItemId) hbc3 on bwf.id = hbc3.workItemId","title":"已办任务操作数据","dbConfig":null,"encrypted":true,"dynamicParams":null}