【扩展报表】如何根据用户的权限进行数据过滤?
方案一:
扩展报表提供了一些系统变量,可以用来进行数据过滤,参考:https://vip.kingdee.com/article/78056687889890560
方案二:
使用宏变量,详细参考:https://vip.kingdee.com/article/78927774467301376
方案三:
一些特殊的场景,如根据当前用户的业务组织范围、当前人员所属部门、当前用户的行政组织范围来过滤数据,则可以再数据集-查询页签的where条件中直接写条件,如
select * from tablexxx where forgxxx in ( 查询当前用户的xx范围脚本)
查询当前用户的xx范围脚本参考:
--当前用户业务组织范围
SELECT FID,FNUMBER,FNAME_L2,FParentID FROM T_ORG_BaseUnit WHERE FID IN(SELECT FORGID FROM T_PM_ORGRANGE WHERE FUSERID=?AND FTYPE=10 ) AND FISUNION = 0
--当前人员的所在部门
SELECT FAdminOrgUnitID FROM T_ORG_Position WHERE FID IN(SELECT FPositionID FROM T_ORG_PositionMember WHERE FISPRIMARY='1' AND FPersonID IN('@ExtRptCurrentUserPersonID'))
--取当前用户行政组织范围的数据
SELECT FID,FNUMBER,FNAME_L2,FParentID FROM t_org_admin WHERE Fissealup = 0 and FID IN(SELECT FORGID FROM T_PM_ORGRANGE WHERE FUSERID= ? AND FTYPE=20 ) AND FISUNION = 0
--当前用户财务组织范围
SELECT FID,FNUMBER,FNAME_L2,FParentID FROM t_Org_company WHERE FIsSealUp = 0 and fid IN (SELECT DISTINCT forgid FROM t_pm_orgrange WHERE fuserid = ? AND FTYPE=10) AND FISUNION = 0
【扩展报表】如何根据用户的权限进行数据过滤?
本文2024-09-22 18:11:30发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-99201.html