zoukankan      html  css  js  c++  java
  • 用友U9数据库--用户对应的权限明细查询

    -----用户对应的权限菜单----------------------------------------------------------------------------------------
    select distinct a.name 组织,y.Name 用户,U.Name 用户组,b.Name 角色名称,d.Name,menuBETrl.DisplayName 菜单名称,
    case authorityBE.Opinion when 0 then '拒绝' when 2 then '允许' end as 权限值   from Base_UserOrgRole x 
    inner join base_role_trl b on x.role=b.id and b.SysMLFlag='zh-CN' and b.name<>'导出报表权限' and b.Name<>'OBA'
    inner join base_role roleBE on x.role=roleBE.id
    inner join Base_RoleApplication z on x.role=z.role
    inner join Base_Application_Trl d on z.application=d.id and d.SysMLFlag='zh-CN'
    inner join base_userorg e on x.userorg=e.id 
    inner join base_organization_trl a on e.org=a.id
    inner join Base_User y on e.[User]=y.id
    inner join Base_UserGroup_Trl U on y.UserGroup=U.ID --显示用户组
    inner join vw_UBF_Security_Right_Task authorityBE on authorityBE.RoleId = roleBE.ID
    inner join UBF_Assemble_Menu menuBE on authorityBE.AuthorityItemId =menuBE.ID
    inner join UBF_Assemble_Menu_Trl menuBETrl on menuBETrl.ID = menuBE.ID and menuBETrl.SysMLFlag='zh-CN'
    inner join Base_Application appBE on menuBE.[Application] = appBE.ID
    --添加条件--
    --where U.Name='财务组' and y.Effective_IsEffective=1 and authorityBE.Opinion=2 --------------------------------------------------------------------------------------------------------------------- -----用户对应的权限菜单--只显示系统模块---------------------------------------------------------------------------------------- select distinct a.name 组织,y.Name 用户,U.Name 用户组,b.Name 角色名称,d.Name 模块名称, case authorityBE.Opinion when 0 then '拒绝' when 2 then '允许' end as 权限值 from Base_UserOrgRole x inner join base_role_trl b on x.role=b.id and b.SysMLFlag='zh-CN' and b.name<>'导出报表权限' and b.Name<>'OBA' inner join base_role roleBE on x.role=roleBE.id inner join Base_RoleApplication z on x.role=z.role inner join Base_Application_Trl d on z.application=d.id and d.SysMLFlag='zh-CN' inner join base_userorg e on x.userorg=e.id inner join base_organization_trl a on e.org=a.id inner join Base_User y on e.[User]=y.id inner join Base_UserGroup_Trl U on y.UserGroup=U.ID --显示用户组 inner join vw_UBF_Security_Right_Task authorityBE on authorityBE.RoleId = roleBE.ID inner join UBF_Assemble_Menu menuBE on authorityBE.AuthorityItemId =menuBE.ID inner join UBF_Assemble_Menu_Trl menuBETrl on menuBETrl.ID = menuBE.ID and menuBETrl.SysMLFlag='zh-CN' inner join Base_Application appBE on menuBE.[Application] = appBE.ID --添加条件--
    --where U.Name='财务组' and y.Effective_IsEffective=1 and authorityBE.Opinion=2
  • 相关阅读:
    Python单元测试框架之pytest 2 -- 生成测试报告
    Python单元测试框架之pytest 1 ---如何执行测试用例
    pytest学习笔记
    Python selenium —— selenium与自动化测试成神之路
    [LeetCode 41.] 缺失的第一个正数
    [LeetCode 802.] 找到最终的安全状态
    [LeetCoe 1116.] 打印零与奇偶数
    [LeetCode 1115.] 交替打印FooBar
    [LeetCode 146.] LRU 缓存机制
    [LeetCode 300.] 最长递增子序列
  • 原文地址:https://www.cnblogs.com/shihua513/p/9406137.html
Copyright © 2011-2022 走看看