`

MAXIMO查询菜单并根据权限过滤

 
阅读更多
查询一级菜单
select t.position ID,
                    ELEMENTTYPE appType,
                    mod.description,
                    NULL PID
               from maxmenu t, maxmodules mod
              where t.keyvalue = mod.module
                and t.menutype = 'MODULE'
                and t.elementtype = 'MODULE'
                and t.visible = 1
                and t.moduleapp in
                    (select m.moduleapp
                       from maxmenu m
                      where m.menutype = 'MODULE'
                        and m.elementtype = 'APP'
                        and m.keyvalue in
                            (select distinct a.app
                               from applicationauth a
                              where a.groupname in
                                    (select g.groupname
                                       from groupuser g
                                      where g.userid = 'ADMIN')
                                and a.optionname = 'READ')) ORDER BY position



查询二级菜单,一级菜单为300000
SELECT * FROM (
(select t.position ID,
                    ELEMENTTYPE appType,
                    t.headerdescription description,
                    '' apptable,
                    m.position PID
               from maxmenu t,
                    (select t.position, mod.module
                       from maxmenu t, maxmodules mod
                      where t.keyvalue = mod.module
                        and t.menutype = 'MODULE'
                        and t.elementtype = 'MODULE'
                        and t.visible = 1
                        and t.moduleapp in
                            (select m.moduleapp
                               from maxmenu m
                              where m.menutype = 'MODULE'
                                and m.elementtype = 'APP'
                                and m.keyvalue in
                                    (select distinct a.app
                                       from applicationauth a
                                      where a.groupname in
                                            (select g.groupname
                                               from groupuser g
                                              where g.userid = 'ADMIN')
                                        and a.optionname = 'READ'))) m,                                       
                          (select POSITION,MODULEAPP,COUNT(1) CONUNTNUM from maxmenu m2,maxapps app where m2.keyvalue=app.app and m2.Elementtype='APP'
                          and M2.keyvalue in
                          (select m.keyvalue
                             from maxmenu m
                            where m.menutype = 'MODULE'
                              and m.keyvalue in
                                  (select distinct a.app
                                     from applicationauth a
                                    where a.groupname in
                                          (select g.groupname
                                             from groupuser g
                                            where g.userid = 'ADMIN')
                                      and a.optionname = 'READ'))
                           GROUP BY POSITION,MODULEAPP HAVING COUNT(1)>0) CON
              where t.menutype = 'MODULE'
                and t.elementtype = 'HEADER'
                and t.moduleapp = m.module
                AND t.position=CON.POSITION
                AND T.moduleapp=CON.moduleapp
                and t.visible = 1
                and m.position='300000'
                and t.moduleapp in
                    (select m.moduleapp
                       from maxmenu m
                      where m.menutype = 'MODULE'
                        and m.keyvalue in
                            (select distinct a.app
                               from applicationauth a
                              where a.groupname in
                                    (select g.groupname
                                       from groupuser g
                                      where g.userid = 'ADMIN')
                                and a.optionname = 'READ')))

            union all
            (select t.position ID,
                    ELEMENTTYPE appType,
                    t.headerdescription description,
                    p.maintbname apptable,
                    m.position PID
               from maxmenu t,
                    maxapps p,
                    (select t.position, mod.module
                       from maxmenu t, maxmodules mod
                      where t.keyvalue = mod.module
                        and t.menutype = 'MODULE'
                        and t.elementtype = 'MODULE'
                        and t.visible = 1
                        and t.moduleapp in
                            (select m.moduleapp
                               from maxmenu m
                              where m.menutype = 'MODULE'
                                and m.elementtype = 'APP'
                                and m.keyvalue in
                                    (select distinct a.app
                                       from applicationauth a
                                      where a.groupname in
                                            (select g.groupname
                                               from groupuser g
                                              where g.userid = 'ADMIN')
                                        and a.optionname = 'READ'))) m
              where t.keyvalue = p.app
                and t.menutype = 'MODULE'
                and t.elementtype = 'APP'
                and t.moduleapp = m.module
                and t.subposition = 0
                and t.visible = 1
                and m.position='200000'
                and t.moduleapp in
                    (select m.moduleapp
                       from maxmenu m
                      where m.menutype = 'MODULE'
                        and m.keyvalue in
                            (select distinct a.app
                               from applicationauth a
                              where a.groupname in
                                    (select g.groupname
                                       from groupuser g
                                      where g.userid = 'ADMIN')
                                and a.optionname = 'READ'))))
                                ORDER BY ID
                               

查询三级菜单,二级菜单为304000
select t.position ID,
                    ELEMENTTYPE appType,
                    p.description description,
                    p.maintbname apptable,
                    pa.position PID
               from maxmenu t,
                    maxapps p,
                    (select t.position, M.module
                       from maxmenu t,
                            (select t.position, mod.module
                               from maxmenu t, maxmodules mod
                              where t.keyvalue = mod.module
                                and t.menutype = 'MODULE'
                                and t.elementtype = 'MODULE'
                                and t.visible = 1
                                and t.moduleapp in
                                    (select m.moduleapp
                                       from maxmenu m
                                      where m.menutype = 'MODULE'
                                        and m.elementtype = 'APP'
                                        and m.keyvalue in
                                            (select distinct a.app
                                               from applicationauth a
                                              where a.groupname in
                                                    (select g.groupname
                                                       from groupuser g
                                                      where g.userid = 'ADMIN')
                                                and a.optionname = 'READ'))) m
                      where t.menutype = 'MODULE'
                        and t.elementtype = 'HEADER'
                        and t.moduleapp = m.module
                        and t.visible = 1
                        and t.moduleapp in
                            (select m.moduleapp
                               from maxmenu m
                              where m.menutype = 'MODULE'
                                and m.keyvalue in
                                    (select distinct a.app
                                       from applicationauth a
                                      where a.groupname in
                                            (select g.groupname
                                               from groupuser g
                                              where g.userid = 'ADMIN')
                                        and a.optionname = 'READ'))) PA
              where t.keyvalue = p.app
                and t.menutype = 'MODULE'
                and t.elementtype = 'APP'
                and t.moduleapp = PA.module
                AND T.position = PA.position
                and t.visible = 1
                and PA.position='304000'
                and t.keyvalue in
                    (select m.keyvalue
                       from maxmenu m
                      where m.menutype = 'MODULE'
                        and m.keyvalue in
                            (select distinct a.app
                               from applicationauth a
                              where a.groupname in
                                    (select g.groupname
                                       from groupuser g
                                      where g.userid = 'ADMIN')
                                and a.optionname = 'READ'))
分享到:
评论

相关推荐

    Maximo系统中Web报表权限管理功能的分析与研究.pdf

    黄彩荣在分析研究中指出,由于现有的Web报表是通过BIRT(Business Intelligence and Reporting Tools)工具开发并部署在Tomcat服务器上,因此,没有内置的权限控制系统使得所有用户都能访问到所有报表,这显然对企业...

    超全的MAXIMO 用户手册

    11. **系统配置与优化**:讨论如何根据企业需求调整MAXIMO的配置参数,提高系统性能,并提供最佳实践建议。 12. **故障排查与支持**:提供常见问题的解决步骤,以及如何获取IBM MAXIMO的技术支持和服务。 13. **...

    maximo系统附件上传功能的实现

    在“安全”> “角色和资源”中,检查用户的权限配置,确保他们有权访问并操作“附件”相关菜单和功能。 4. **前端界面配置** - 在Maximo的UI界面,你需要确保附件上传按钮和链接可见且可操作。这通常涉及到定制...

    maximo

    在上述内容中,提到了Maximo的一些常见问题及其解决方法,主要涉及了过滤器、只读属性、工作流设计器、错误处理以及关键代码示例。下面将详细解释这些知识点: 1. **过滤器问题**:当在Maximo应用程序列表中遇到...

    maximo二级菜单在IE8中打不开现象解决方式

    通过对Maximo二级菜单在IE8中无法正常展开的问题进行深入分析,我们提出了相应的解决方案,并详细阐述了实施步骤。通过这一系列的改进措施,可以有效提升Maximo系统的用户体验,确保其在各种浏览器环境下的稳定运行...

    MAXIMO拔高培训

    学习如何自定义主菜单,可以根据不同角色和权限分配不同的菜单项,提高用户体验。 - **自定义菜单**:通过创建自定义菜单,可以为特定用户组或角色提供个性化的功能入口,方便管理和操作。 4. **启动中心的使用** ...

    maximo开发指南 maximo maximo开发

    根据给定的文件信息,我们可以提炼出关于Maximo 6.20开发的重要知识点,尤其聚焦于其系统架构、开发环境配置以及应用部署等方面。 ### Maximo 6.20开发指南 #### 1. 目标范围与定义 Maximo 6.20是一款由MRO公司...

    maximo个人经验总结——魏慧

    对于需要移除特定应用程序如600WM手册的情况,魏慧列出了一系列SQL命令,通过这些命令可以在数据库中安全地删除与该应用程序相关的所有记录,包括应用本身、呈现方式、信号选项、权限、标签和菜单项。 ### 工作流...

    maximo相关重要类源码

    在“maximo相关重要类源码”这个主题中,我们可以深入探讨Maximo系统中的核心概念和技术,包括自动取数、对象类方法操作、对话框操作、打印操作、查询操作、字段类操作以及密码解密等关键领域。 1. **自动取数**:...

    MAXIMO 7.1的培训PPT

    3. **用户界面**:熟悉MAXIMO 7.1的用户界面,包括工作台、菜单选项、定制化工具,以及如何自定义视图以满足不同角色的需求。 4. **资产管理**:理解如何使用系统进行资产登记、分类、追踪和报告,包括资产的采购、...

    maximo二次开发

    根据提供的文件信息,我们可以深入探讨“Maximo二次开发”的相关知识点。Maximo是一款业界领先的企业资产管理(EAM)软件解决方案,被广泛应用于多个行业领域,包括制造业、能源、政府机构等。二次开发是指在现有...

    maximo-API的一些方法

    - `queryByExample(object)`: 根据示例对象进行查询。 - `queryWithFilter(queryObject, filterCriteria)`: 使用过滤器执行复杂查询。 7. **事件与通知(Event and Notifications)** - `subscribeToEvent(event...

    maximo系统管理员指南(中文)

    在“权限组”应用程序中,管理员可通过标签页查看不同类型的权限组,并执行搜索、复制、删除等操作。此外,Maximo支持权限组的组合和合并,允许管理员灵活调整权限分配策略。 ### 地点管理 地点管理是Maximo的一项...

    maximo开发应用程序设计的顺序

    在Maximo开发中,理解并熟练掌握这些步骤是至关重要的,它们确保了应用程序能够有效地与数据库交互,提供用户友好的界面,并遵循组织的权限策略。通过细致的设计和合理的权限控制,可以构建出满足业务需求的高效工作...

    深入了解maximo之报表管理及开发指南

    报表设计器支持SQL查询编写,你可以根据业务逻辑定制数据源,从Maximo数据库中提取所需信息。同时,报表可以设置不同的筛选条件和排序方式,以适应不同场景下的数据分析。 报表开发涉及多个层面,包括报表模板设计...

    maximo系统birt报表的eclipese开发配置及导入系统

    6. 创建一个名为`V7`的文件夹(名称可自定义),并将Maximo安装目录下的`C:\IBM\SMP\maximo\reports\birt`中的`libraries`和`templates`两个文件夹复制到这个新创建的`V7`文件夹。 7. 启动BIRT IDE(`eclipsebirt...

    Maximo - LDAP 配置

    - **功能**: 存储用户凭证,并根据LDAP协议提供对这些信息的访问。 **目录结构** - **概念**: 目录结构是一种层次化的树状结构,每个节点都有一个唯一的名称(DN,Distinguished Name)来标识。 - **组成**: - DN...

    maximo7.1安装及数据库建表SQL命令

    `确保了`maximo`用户对`maxdata`表空间有无限的配额,并获得了数据库管理员级别的权限。 ### 二、实践意义与注意事项 - **国际化支持**:创建多语言数据库是Maximo在全球范围内广泛应用的关键。 - **合理的存储...

    maximo的JMS配置

    ### Maximo 的 JMS 配置详解 #### 一、概述 Maximo 是一款功能强大的资产管理软件,广泛应用于企业级的设备维护与管理领域。为了实现与其他系统的无缝对接,Maximo 支持多种消息传递机制,其中 Java 消息服务(JMS...

Global site tag (gtag.js) - Google Analytics