技术答疑.常用SQL.查询工作流当前节点信息
【应用场景】
查询工作流当前节点信息。
【案例演示】
采购订单,已启动工作流,查询工作流当前节点信息。
测试数据如下图:
待办任务:
流程图:
【实现步骤】
<1>登录星空数据中心所在数据库服务器,执行以下SQL查询工作流当前节点信息。
--查询采购订单的当前流程节点信息 (节点实例状态:1完成2当前) SELECT x1.FBILLNO AS 单据编号 , x3.FPROCINSTID AS 流程实例内码 , x3.FNUMBER AS 流程实例编码 , x4l.FACTNAME AS 当前节点名称 , x6.FTITLE AS 当前节点动作主题 , x7.FNAME AS 当前处理人 , x4.FCREATETIME AS 流转至当前处理人时间 FROM T_PUR_POORDER x1 LEFT JOIN V_WF_PIBIMAPAll x2 ON x2.FOBJECTTYPEID = 'PUR_PurchaseOrder' AND CAST(x2.FKEYVALUE AS INT) = x1.FID LEFT JOIN V_WF_PROCINSTMG x3 ON x2.FPROCINSTID = x3.FPROCINSTID LEFT JOIN V_WF_ACTINSTMG x4 ON x3.FPROCINSTID = x4.FPROCINSTID LEFT JOIN V_WF_ACTINSTMG_L x4l ON x4.FACTINSTID = x4l.FACTINSTID AND x4l.FLOCALEID = 2052 LEFT JOIN V_WF_ASSIGNMG x5 ON x4.FACTINSTID = x5.FACTINSTID LEFT JOIN V_WF_RECEIVERMG x6 ON x5.FASSIGNID = x6.FASSIGNID LEFT JOIN T_SEC_USER x7 ON x6.FRECEIVERID = x7.FUSERID WHERE x1.FBILLNO = 'CGDD000429' AND x4.FSTATUS = '2';
查询结果:
---------------------------------------------------------------------------------------------------------
【更多案例】
--查询采购订单的流程节点信息 (节点实例状态:1完成2当前)
SELECT x1.FBILLNO AS 单据编号 , x3.FPROCINSTID AS 流程实例内码 , x3.FNUMBER AS 流程实例编码 , x4l.FACTNAME AS 当前节点名称 , x6.FTITLE AS 当前节点动作主题 , x7.FNAME AS 当前处理人 , x4.FCREATETIME AS 流转至当前处理人时间 , CASE WHEN x9.FCOMPLETEDTIME IS NULL THEN x4.FCOMPLETEDTIME ELSE x9.FCOMPLETEDTIME END AS 处理时间 FROM T_PUR_POORDER x1 LEFT JOIN V_WF_PIBIMAPAll x2 ON x2.FOBJECTTYPEID = 'PUR_PurchaseOrder' AND CAST(x2.FKEYVALUE AS INT) = x1.FID LEFT JOIN V_WF_PROCINSTMG x3 ON x2.FPROCINSTID = x3.FPROCINSTID LEFT JOIN V_WF_ACTINSTMG x4 ON x3.FPROCINSTID = x4.FPROCINSTID LEFT JOIN V_WF_ACTINSTMG_L x4l ON x4.FACTINSTID = x4l.FACTINSTID AND x4l.FLOCALEID = 2052 LEFT JOIN V_WF_ASSIGNMG x5 ON x4.FACTINSTID = x5.FACTINSTID LEFT JOIN V_WF_RECEIVERMG x6 ON x5.FASSIGNID = x6.FASSIGNID LEFT JOIN T_SEC_USER x7 ON x6.FRECEIVERID = x7.FUSERID LEFT JOIN V_WF_APPROVALASSIGNMG x8 ON x8.FASSIGNID = x5.FASSIGNID LEFT JOIN V_WF_APPROVALITEMMG x9 ON x9.FAPPROVALASSIGNID = x8.FAPPROVALASSIGNID AND x9.FRECEIVERID = x6.FRECEIVERID WHERE x1.FBILLNO = 'CGDD000429'; --AND x4.FSTATUS = '2';
---------------------------------------------------------------------------------------------------------
【金蝶云星空BOS二次开发案例演示】https://vip.kingdee.com/article/94751030918525696
技术答疑.常用SQL.查询工作流当前节点信息
【应用场景】查询工作流当前节点信息。【案例演示】采购订单,已启动工作流,查询工作流当前节点信息。测试数据如下图:待办任务:流程图:...
点击下载文档
本文2024-09-23 04:00:44发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-162536.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章