感悟

1.编程不是看会的,是敲会的。只要敲敲敲,才可以深刻的记忆,当然这只能称之为会用,之后深入了解其实现原理才能将其吸收融会贯通。

2.要养成良好的代码习惯,整洁干净,命名规范,以及详细的注释。这对帮助你成长都大有裨益。

3.要阅读大牛写的代码,一个人的力量终究是有限的,经常阅读高质量的源码,无形之中就会改变我们的思路,就好比自己琢磨武功,与拥有武林秘籍者相比…

用友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

organizational structure

组织架构设计与运行中需关注的主要风险
1.治理结构形同虚设,缺乏科学决策、良性运行机制和执行力,可能导致企业经营失败,难以实现发展战略。
2.内部机构设计不科学,权责分配不合理,可能导致机构重叠、职能交叉或缺失、推诿扯皮,运行效率低下。