废话不多说,直接上代码
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
推荐阅读