{"sql":"select \"bwi\".\"id\" as \"流程实例id\", \"bwi\".\"workflowCode\" as \"流程模板编码\", \"wh\".\"workflowName\" as \"流程名称\", \"bwi\".\"originator\" as \"流程发起人id\", \"bwi\".\"originatorName\" as \"流程发起人姓名\", \"bwi\".\"departmentId\" as \"发起人部门id\", \"bwi\".\"departmentName\" as \"发起人部门名称\", \"bwi\".\"startTime\" as \"流程发起时间\", \"bwi\".\"finishTime\" as \"流程结束时间\", round(\"bwi\".\"usedTime\" / 1000, 2) as \"耗时（秒）\", round(\"bwi\".\"usedTime\" / 60000, 2) as \"耗时（分）\", round(\"bwi\".\"usedTime\" / 3600000, 2) as \"耗时（小时）\", round(\"bwi\".\"usedTime\" / 86400000, 2) as \"耗时（天）\", \t\t  round(\"bwi\".\"calendarUsedTime\" / 1000, 2) as \"工作日历耗时（秒）\", round(\"bwi\".\"calendarUsedTime\" / 60000, 2) as \"工作日历耗时（分）\", round(\"bwi\".\"calendarUsedTime\" / 3600000, 2) as \"工作日历耗时（小时）\", case when \"bwi\".\"state\" = 'DRAFT' then '草稿' when \"bwi\".\"state\" = 'PROCESSING' then '进行中' when \"bwi\".\"state\" = 'CANCELED' then '已作废' when \"bwi\".\"state\" = 'EXCEPTION' then '异常' when \"bwi\".\"state\" = 'COMPLETED' and (\"bwi\".\"endStatus\" = 'APPROVAL' or \"bwi\".\"endStatus\" is null or \"bwi\".\"endStatus\" = '') then '流程通过' else '手动结束' end as \"流程状态\", \"bwi\".\"schemaCode\" as \"所属模型编码\", \"haf\".\"name\" as \"所属模型名称\", \"bwi\".\"appCode\" as \"所属应用编码\", \"hap\".\"name\" as \"所属应用名称\", case when \"hbc\".\"count\" is not null then '运维' else '非运维' end as \"人工运维\", \"bwi\".\"originatorDeptQueryCode\" as \"部门查询字段\" from \"biz_workflow_instance\" \"bwi\" left join \"h_workflow_header\" \"wh\" on \"bwi\".\"workflowCode\" = \"wh\".\"workflowCode\" left join \"h_app_function\" \"haf\" on \"bwi\".\"schemaCode\" = \"haf\".\"code\" left join \"h_app_package\" \"hap\" on \"bwi\".\"appCode\" = \"hap\".\"code\" left join (select \"workflowInstanceId\", count(*) as \"count\" from \"h_biz_comment\" where \"workItemId\" = 'ADMIN' group by \"workflowInstanceId\") \"hbc\" on \"bwi\".\"id\" = \"hbc\".\"workflowInstanceId\"","title":"流程实例","dbConfig":null,"encrypted":true,"dynamicParams":null,"sqlParams":null}