通过SQL获取当前单据的审批流节点

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

通过SQL获取当前单据的审批流节点

废话不多说,直接上代码

SELECT 

t_WF_ActInst.FActivityId,

t_WF_ApprovalAssign.FResult,

t_WF_ApprovalAssign.FDisposition,

t_WF_Receiver.FReceiverId,

t_SEC_User.FName,

t_WF_ApprovalItem.FStatus, 

t_WF_ApprovalItem.FActionResult,

t_WF_ApprovalItem.FDisposition, 

t_WF_ApprovalItem.FCompletedTime

FROM  

t_WF_PiBiMap

INNER JOIN t_WF_ProcInst ON (t_WF_ProcInst.FProcInstId = t_WF_PiBiMap.FProcInstId)

INNER  JOIN t_WF_ActInst on (t_WF_ActInst.FProcInstId = t_WF_ProcInst.FProcInstId)

INNER JOIN t_WF_Assign on (t_WF_Assign.FActInstId = t_WF_ActInst.FActInstId)

INNER JOIN t_WF_Receiver on (t_WF_Receiver.FAssignId = t_WF_Assign.FAssignId)

INNER JOIN t_SEC_User ON (t_SEC_User.FUserId = t_WF_Receiver.FReceiverId)

INNER JOIN t_WF_ApprovalAssign on (t_WF_Assign.FAssignId = t_WF_ApprovalAssign.FAssignId)

LEFT JOIN t_WF_ApprovalItem on (t_WF_ApprovalItem.FApprovalAssignId = t_WF_ApprovalAssign.FApprovalAssignId

AND t_WF_ApprovalItem.FReceiverId = t_WF_Receiver.FReceiverId)

WHERE  

t_WF_PiBiMap.FObjectTypeId = '单据唯一标识(例:ENG_ECNOrder)' 

AND t_WF_PiBiMap.FKeyValue = '单据内码(例:100584)'

order by t_WF_Receiver.FReceiverId



【emoji】

通过SQL获取当前单据的审批流节点

废话不多说,直接上代码SELECT t_WF_ActInst.FActivityId,t_WF_ApprovalAssign.FResult,t_WF_ApprovalAssign.FDisposition,t_WF_Receiver.F...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息