`

MAXIMO查询所有菜单

 
阅读更多
CREATE OR REPLACE PROCEDURE searchMenuByUserId(inuserid IN varchar,
                                               menucur  OUT sys_refcursor,
                                               errorMsg OUT varchar) IS
BEGIN
  errorMsg := '';
  OPEN menucur FOR
    select *
      from (
           --查询一级菜单
            (select t.position APP,
                    'MODULE' appType,
                    '' APPURL,
                    mod.description,
                    '' mainTbName,
                    '5' maxAppsId,
                    t.position ORDERID,
                    NULL PARENT
               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 = inuserid)
                                and a.optionname = 'READ'))) union all

           --查询二级菜单
            (select t.position app,
                    'MODULE' appType,
                    '' APPURL,
                    t.headerdescription description,
                    '' mainTbName,
                    '5' maxAppsId,
                    t.position ORDERID,
                    m.position parent
               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 = inuserid)
                                        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 = inuserid)
                                      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 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 = inuserid)
                                and a.optionname = 'READ')))

            union all

           --查询二级应用
            (select t.position app,
                    'APP' appType,
                    p.app APPURL,
                    p.description,
                    '' mainTbName,
                    '5' maxAppsId,
                    t.position ORDERID,
                    m.position parent
               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 = inuserid)
                                        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 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 = inuserid)
                                and a.optionname = 'READ')))

            union all

           --查询三级菜单
            (select t.subposition app,
                    'APP' appType,
                    p.app APPURL,
                    p.description,
                    '' mainTbName,
                    '5' maxAppsId,
                    t.subposition ORDERID,
                    pa.position parent
               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 = inuserid)
                                                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 = inuserid)
                                        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 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 = inuserid)
                                and a.optionname = 'READ')))) menu
     order by app
     ;
     EXCEPTION WHEN OTHERS THEN errorMsg := sqlerrm; -- sqlcode是异常编号,sqlerrm是异常的详细信息
END searchMenuByUserId;
分享到:
评论

相关推荐

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

    - 在IE8以及其他主流浏览器上进行全面的功能测试,确保所有菜单都能正常展开且位置准确。 - 考虑使用自动化测试工具来提高测试效率。 5. **用户指南更新**: - 更新用户手册,明确指出在使用Maximo系统时推荐...

    超全的MAXIMO 用户手册

    2. **MAXIMO界面与导航**:详细介绍MAXIMO的用户界面,包括菜单结构、工具栏、快捷键和自定义设置,使用户能够快速熟悉工作环境。 3. **角色与权限**:说明不同用户角色(如管理员、技术人员、采购员)的权限设置,...

    MAXIMO拔高培训

    - **主菜单**:Maximo的主菜单包含了所有系统级别的功能,如资产管理、工作管理等。学习如何自定义主菜单,可以根据不同角色和权限分配不同的菜单项,提高用户体验。 - **自定义菜单**:通过创建自定义菜单,可以...

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

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

    maximo用户指南(中文)

    导航栏是Maximo界面的核心部分,提供了对所有功能模块的快速访问入口,包括工作订单、资产管理、采购和库存等功能区。 ### 个性化Portlet Portlet是Maximo界面上的小部件,用户可以根据个人偏好定制显示内容,如...

    maximo二次开发

    然而,每个企业的业务需求都是独特的,标准版的Maximo可能无法完全满足所有特定需求。因此,通过二次开发来定制系统成为了一种常见且必要的实践。二次开发能够帮助企业实现以下目标: 1. **提高工作效率**:通过...

    MAXIMO产品手册

    应用程序屏幕、浏览器菜单和图标、导航栏、工具栏和菜单等都是用户与系统进行交互的重要界面元素。这些界面元素的熟悉程度将直接影响用户的工作效率和使用体验。 手册中还包含了数据库方面的详细介绍,比如数据库...

    Maximo 系统功能模块关系说明

    这意味着Maximo能够记录和管理资产在其生命周期内的所有静态信息和动态过程。这不仅包括资产的基本信息,还涵盖了与资产相关的所有维护记录、变动历史和其他关键信息。 #### 第二章 模块关系线路图 **第一节 生成...

    MAXIMO 7.1的培训PPT

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

    Maximo mbs

    文件最后还提到了版权信息和版权声明,这是对文档内容的法律声明,指出了文档的使用范围以及版权所有者的声明。 通过以上知识点的解释,我们可以看到IBM Maximo Asset Management是一款功能全面的资产与维护管理...

    maximo个人经验总结——魏慧

    了解MAXMENU表的列名对于理解Maximo菜单结构至关重要。魏慧不仅解释了这些列名的意义,还介绍了如何利用这些信息来隐藏不需要显示的菜单项。 ### 更改Oracle IP地址 在某些情况下,可能需要更改Maximo所连接的...

    maximo 学习资料

    - `psdi.jsp.app`: 模块对应的页面流转代码,处理页面上的菜单和按钮交互。 - `psdi.jsptags`: JSP标签库,用于在JSP页面中嵌入动态功能。 - `psdi.mbo`: 最核心的包,包含Mbo(Managed Business Object)相关类...

    MAXIMO通用查询及基本操作方法.pdf

    - 在Maximo中,用户可以在搜索字段中选择预定义的值,这通常是下拉菜单的形式,方便快速选择。 7. **使用更多搜索字段**: - 为了进行更复杂的查询,用户可以添加更多的搜索条件,组合使用不同的运算符和通配符,...

    maximo二次开发指南1.rar

    2. **定制UI**:Maximo的用户界面可以通过自定义表单、视图和菜单进行修改。你需要掌握如何使用Maximo Application Designer(MAD)来创建和编辑这些元素,以提供符合用户需求的交互体验。 3. **工作流定制**:...

    maximo删除应用sql

    在Maximo系统中,SQL查询语言被广泛用于数据操作,包括数据的增删改查等。通过编写特定的SQL语句,可以高效地对Maximo数据库进行管理。本文将重点介绍如何通过SQL语句删除Maximo中的应用程序及其相关数据。 #### 三...

    maximo系统表

    21. **MAXMENU、PALETTEITEM表**:构建系统菜单和界面元素。 22. **ASSETHIERARCHY、ASSETHISTORY、ASSETMETER、ASSETSTATUS和MEASUREPOINT表**:处理设备的层级结构、历史、仪表读数、状态和测点数据。 这些表...

    maximo扩展开发介绍及常用术语

    2. **psdi.jsp.app**: 与各个模块的页面流转代码相关,负责页面菜单和按钮的控制。 3. **psdi.jsptags**: 提供JSP标签库,用于构建用户界面。 4. **psdi.mbo**: 最为核心的部分,包含处理业务对象的类。 5. **...

    Maximo 系统功能模块关系说明书

    - **记录**:记录所有相关的资产管理活动及其结果。 - **分析**:评估资产管理活动的效果,识别改进的机会。 - **改进**:基于分析结果调整现有流程,进一步提高效率和效果。 #### 第二节 资产全生命周期管理 ...

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

    - **位置**:在Maximo的“启动中心”->“转到”->“配置”菜单中可以找到应用程序设计器。 - **新建应用程序**:填写应用程序的名称、描述、主对象和模块名称,选择适当的页面布局,如List和Main页面。 7. **页面...

Global site tag (gtag.js) - Google Analytics