场景说明:OA业务流程需要导出基础信息及审批记录信息
场景类型:常规
涉及版本:E-cology9
解决方案:
1、流程引擎基础表
select * from workflow_base 流程基本信息表
select * from workflow_type 流程类型信息表
select * from workflow_requestlog 流程审批记录信息表
select * from workflow_nodebase 流程节点信息表
select * from workflow_requestbase 流程记录信息表
2、流程基本信息数据导出SQL
select req.requestid 请求id, req.workflowid 流程ID, type.typename 流程类型, base.workflowname 流程名称, req.REQUESTMARK 流程编号, req.requestname 标题, req.status 流转状态, req.creater 创建人, req.createdate 创建日期 , req.createtime 创建时间 from workflow_requestbase req left join workflow_base base on req.workflowid = base.id left join workflow_type type on base.workflowtype = type.id where req.workflowid !=1 and req.status is not null -- and type.id = '2521' and -- base.workflowname like '%流程' and -- req.createdate > '2021-01-01' and -- req.requestid = '1034037'
3、流程审批记录数据导出SQL
select log.requestid 请求id, log.workflowid 流程ID, log.nodeid 节点id, node.nodename 节点名称, log.operator 操作者, log.operatedate 操作日期, log.operatetime 操作时间, to_char(log.remark) 签字信息 from workflow_requestlog log left join workflow_nodebase node on log.nodeid = node.id where log.requestid in( select req.requestid from workflow_requestbase req left join workflow_base base on req.workflowid = base.id left join workflow_type type on base.workflowtype = type.id where -- type.id = '2521' and -- base.workflowname like '%流程' and -- req.createdate > '2021-01-01' and -- req.requestid = '1034037' req.workflowid !=1 and req.status is not null )