泛微OA中,流程版本会一直升级,下面这条SQL查询的是最新版的流程ID以及表名等相关信息:
(此处用的是SQLServer数据库)? (b.isvalid = 1表示启用中的流程)
SELECT a.id, b.id as workflowid,
(SELECT indexdesc FROM HtmlLabelIndex WHERE id = a.namelabel) as formname,
a.tablename, c.typename, b.workflowname,
b.isvalid FROM workflow_bill a
INNER JOIN workflow_base b ON a.id = b.formid
LEFT JOIN workflow_type c ON b.workflowtype = c.id
WHERE b.isvalid = 1 AND c.typename LIKE '%测试%'
SELECT a.id, b.id as workflowid,
(SELECT indexdesc FROM HtmlLabelIndex WHERE id = a.namelabel) as formname,
a.tablename, c.typename, b.workflowname, b.isvalid
FROM workflow_bill a
INNER JOIN workflow_base b ON a.id = b.formid
LEFT JOIN workflow_type c ON b.workflowtype = c.id
WHERE b.isvalid = 1 AND c.typename LIKE '%考勤管理%'
AND b.workflowname LIKE '%请假%'