查询流程节点审批人或者审批岗位原创
3人赞赏了该文章
275次浏览
编辑于2023年10月13日 13:27:46
SELECT L.FDISPLAYNAME 流程名称,T.FNUMBER 编码 , MO.FNAME 入口单据, T.审批结点与人员 , T.FDEFINITIONXML 源流程定义XML FROM (
SELECT CONVERT(VARCHAR(MAX), FDefinitionXML.query('
for $Loc in /ApprovalProcess/Activities/*,
$DisplayName in $Loc/DisplayName[1],
$name in $Loc//Receivers/*/Name
where $DisplayName!="" and local-name($Loc) ="FinalApprovalActivity" or local-name($Loc) = "ApprovalActivity"
return
concat($DisplayName,"|",$name,",")
')) as 审批结点与人员 ,*
FROM AIS20230822142558..T_WF_PROCDEF
) T JOIN AIS20230822142558..T_WF_PROCDEF_L L ON T.FPROCDEFID=L.FPROCDEFID
JOIN AIS20230822142558..T_META_OBJECTTYPE_L MO ON T.FOBJECTTYPEID=MO.FID
WHERE 审批结点与人员 <> '' and (审批结点与人员 like '%销售经理%' or 审批结点与人员 like '%张三%')
SELECT CONVERT(VARCHAR(MAX), FDefinitionXML.query('
for $Loc in /ApprovalProcess/Activities/*,
$DisplayName in $Loc/DisplayName[1],
$name in $Loc//Receivers/*/Name
where $DisplayName!="" and local-name($Loc) ="FinalApprovalActivity" or local-name($Loc) = "ApprovalActivity"
return
concat($DisplayName,"|",$name,",")
')) as 审批结点与人员 ,*
FROM AIS20230822142558..T_WF_PROCDEF
) T JOIN AIS20230822142558..T_WF_PROCDEF_L L ON T.FPROCDEFID=L.FPROCDEFID
JOIN AIS20230822142558..T_META_OBJECTTYPE_L MO ON T.FOBJECTTYPEID=MO.FID
WHERE 审批结点与人员 <> '' and (审批结点与人员 like '%销售经理%' or 审批结点与人员 like '%张三%')
赞 3
3人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!
推荐阅读