二开案例.工作流.参与人类型.参与人变量
【应用场景】
设计时:设置参与人变量,可选变量有单据字段,流程信息等。
运行时:基于设置的参与人变量,基于当前上下文,解析出真实用户。
【设计时】
【运行时】
【解析类】
参与人变量由业务对象WF_D_VariableMember进行定义。
-- 查询参与人类型(WF_D_ParticipantType) SELECT * FROM T_WF_PARTICIPANTTYPE ORDER BY FORDER -- 查询参与人变量解析类(WF_D_VariableMember) SELECT b.FNAME AS 业务对象名称,a.FREFBDFORMID AS 业务对象标识,a.FPARTICIPANTTYPEID AS 参与人类型,a.FWRAPPERCLASS AS 参与人解析类 FROM T_WF_VARIABLEMEMBER a LEFT JOIN T_META_OBJECTTYPE_L b ON a.FREFBDFORMID=b.FID AND b.FLOCALEID=2052
基础资料相关的参与人变量解析类:
ParticipantType.Department(部门):Kingdee.K3.BD.App.Core.WorkflowMemberWrapper.DepartmentMemberWrapper,Kingdee.K3.BD.App.Core
查询SQL示例:
-- 通过部门(BD_Department)查询员工任岗信息(BD_NEWSTAFF) SELECT s.FSTAFFID FROM T_BD_DEPARTMENT cet INNER JOIN T_BD_STAFF s ON cet.FDEPTID = s.FDEPTID AND s.FDOCUMENTSTATUS = 'C' AND s.FFORBIDSTATUS = 'A' WHERE cet.FDEPTID = 100706 AND cet.FDOCUMENTSTATUS = 'C' AND cet.FFORBIDSTATUS = 'A'; -- 通过员工任岗信息(BD_NEWSTAFF)查询用户(SEC_User) SELECT U.FUSERID , U.FNAME , STAFF.FPOSTID , STAFF.FSTAFFID FROM T_BD_STAFF STAFF INNER JOIN V_BD_CONTACTOBJECT CONTACT ON STAFF.FPERSONID = CONTACT.fid AND CONTACT.FDOCUMENTSTATUS = 'C' AND CONTACT.FFORBIDSTATUS = 'A' INNER JOIN T_SEC_USER U ON U.FLINKOBJECT = CONTACT.fid AND U.FFORBIDSTATUS = 'A' WHERE STAFF.FSTAFFID IN ( 467678 ) AND STAFF.FDOCUMENTSTATUS = 'C' AND STAFF.FFORBIDSTATUS = 'A';
ParticipantType.Empinfo(员工):Kingdee.K3.BD.App.Core.WorkflowMemberWrapper.EmpinfoMemberWrapper,Kingdee.K3.BD.App.Core
查询SQL示例:
-- 根据员工(BD_Empinfo)查询用户(SEC_User) SELECT U.FUSERID , U.FNAME , EMP.FID EMPINFOID FROM T_HR_EMPINFO EMP JOIN V_BD_CONTACTOBJECT CONTACT ON EMP.FPERSONID = CONTACT.fid AND CONTACT.FDOCUMENTSTATUS = 'C' AND CONTACT.FFORBIDSTATUS = 'A' JOIN T_SEC_USER U ON U.FLINKOBJECT = CONTACT.fid AND U.FFORBIDSTATUS = 'A' WHERE EMP.FID IN ( 100885 ) AND EMP.FDOCUMENTSTATUS = 'C' AND EMP.FFORBIDSTATUS = 'A';
ParticipantType.Operator(业务员[例如:采购员、质检员、业务员、计划员、销售员、仓管员、财务人员]):Kingdee.K3.BD.App.Core.WorkflowMemberWrapper.OperatorMemberWrapper,Kingdee.K3.BD.App.Core
查询SQL示例:
-- 根据业务员(BD_OPERATOR)查询用户(SEC_User) SELECT U.FUSERID , U.FNAME , STAFF.FPOSTID FROM T_BD_OPERATORENTRY OPERA INNER JOIN T_BD_STAFF STAFF ON OPERA.FSTAFFID = STAFF.FSTAFFID AND STAFF.FDOCUMENTSTATUS = 'C' AND STAFF.FFORBIDSTATUS = 'A' INNER JOIN V_BD_CONTACTOBJECT CONTACT ON STAFF.FPERSONID = CONTACT.fid AND CONTACT.FDOCUMENTSTATUS = 'C' AND CONTACT.FFORBIDSTATUS = 'A' INNER JOIN T_SEC_USER U ON U.FLINKOBJECT = CONTACT.fid AND U.FFORBIDSTATUS = 'A' WHERE OPERA.FISUSE = '1' AND OPERA.FENTRYID IN ( 300752 );
ParticipantType.Organization(组织机构):Kingdee.BOS.Workflow.App.Core.Participant.MemberWrapper.OrganizationMemberWrapper,Kingdee.BOS.Workflow.App.Core
查询SQL示例:
-- 根据组织机构(ORG_Organizations)查询用户(SEC_User) SELECT B.FUSERID , B.FNAME , A.FORGID FROM T_SEC_USERORG A INNER JOIN T_SEC_USER B ON A.FUSERID = B.FUSERID WHERE B.FUSERID <> 16394 AND B.FFORBIDSTATUS = 'A' AND B.FUSERTYPE = '1';
ParticipantType.Post(岗位):Kingdee.K3.BD.App.Core.WorkflowMemberWrapper.PostMemberWrapper,Kingdee.K3.BD.App.Core
查询SQL示例:
-- 根据员工任岗(BD_NEWSTAFF)的岗位(HR_ORG_HRPOST)查询用户(SEC_User) SELECT U.FUSERID , U.FNAME , STAFF.FPOSTID , STAFF.FUSEORGID FROM T_BD_STAFF STAFF INNER JOIN V_BD_CONTACTOBJECT CONTACT ON STAFF.FPERSONID = CONTACT.fid AND CONTACT.FDOCUMENTSTATUS = 'C' AND CONTACT.FFORBIDSTATUS = 'A' INNER JOIN T_SEC_USER U ON U.FLINKOBJECT = CONTACT.fid AND U.FFORBIDSTATUS = 'A' WHERE STAFF.FDOCUMENTSTATUS = 'C' AND STAFF.FFORBIDSTATUS = 'A' AND STAFF.FPOSTID IN ( 100884 );
ParticipantType.Staff(员工任岗):Kingdee.K3.BD.App.Core.WorkflowMemberWrapper.StaffMemberWrapper,Kingdee.K3.BD.App.Core
查询SQL示例:
-- 根据员工任岗(BD_NEWSTAFF)查询用户(SEC_User) SELECT U.FUSERID , U.FNAME , STAFF.FPOSTID , STAFF.FSTAFFID FROM T_BD_STAFF STAFF INNER JOIN V_BD_CONTACTOBJECT CONTACT ON STAFF.FPERSONID = CONTACT.fid AND CONTACT.FDOCUMENTSTATUS = 'C' AND CONTACT.FFORBIDSTATUS = 'A' INNER JOIN T_SEC_USER U ON U.FLINKOBJECT = CONTACT.fid AND U.FFORBIDSTATUS = 'A' WHERE STAFF.FSTAFFID IN ( 467678 ) AND STAFF.FDOCUMENTSTATUS = 'C' AND STAFF.FFORBIDSTATUS = 'A';
ParticipantType.User(用户):Kingdee.BOS.Workflow.App.Core.Participant.MemberWrapper.UserMemberWrapper,Kingdee.BOS.Workflow.App.Core
查询SQL示例:
-- 查询用户(SEC_User) SELECT A.FUSERID , A.FNAME FROM T_SEC_USER A WHERE A.FFORBIDSTATUS = 'A' AND A.FUSERID IN ( 100008 );
其它几种特殊的参与人变量解析类:
ParticipantType.Contact(联系人):Kingdee.K3.BD.App.Core.WorkflowMemberWrapper.ContactMemberWrapper,Kingdee.K3.BD.App.Core
查询SQL示例:
-- 根据联系对象(BD_ContactObject)查询用户(SEC_User) SELECT U.FUSERID , U.FNAME FROM T_SEC_USER U INNER JOIN V_BD_CONTACTOBJECT C ON U.FLINKOBJECT = C.fid WHERE U.FFORBIDSTATUS = 'A' AND C.FDOCUMENTSTATUS = 'C' AND C.FFORBIDSTATUS = 'A' AND C.fid = 100886;
ParticipantType.CustomerContact(客户联系人):Kingdee.K3.BD.App.Core.WorkflowMemberWrapper.CustomerMemberWrapper,Kingdee.K3.BD.App.Core
ParticipantType.SupplierContact(供应商联系人):Kingdee.K3.BD.App.Core.WorkflowMemberWrapper.SupplierMemberWrapper,Kingdee.K3.BD.App.Core
查询SQL示例:
-- 根据联系对象(BD_ContactObject)查询用户(SEC_User) SELECT U.FUSERID , U.FNAME FROM T_SEC_USER U INNER JOIN V_BD_CONTACTOBJECT C ON U.FLINKOBJECT = C.fid WHERE U.FFORBIDSTATUS = 'A' AND C.FDOCUMENTSTATUS = 'C' AND C.FFORBIDSTATUS = 'A' AND C.ftype = '3' AND C.fcompany = 135892;
ParticipantType.User(用户):Kingdee.BOS.Workflow.App.Core.Participant.MemberWrapper.UserMemberWrapper,Kingdee.BOS.Workflow.App.Core
ParticipantType.Users(多用户):Kingdee.BOS.Workflow.App.Core.Participant.MemberWrapper.UserMemberWrapper,Kingdee.BOS.Workflow.App.Core
---------------------------------------------------------------------------------------------------------
【金蝶云星空BOS二次开发案例演示】https://vip.kingdee.com/article/94751030918525696
二开案例.工作流.参与人类型.参与人变量
本文2024-09-23 03:57:48发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-162223.html