zoukankan      html  css  js  c++  java
  • waf平台常用方法总结

    //得到当前登录人各种的信息

          //得到配置文件中的档案室角色id
          String das = WAFConfigure.getProperty("das");
          //得到登陆人的部门ID
          String deptid = this.getCurrentUser().getDeptId();
          String deptName ="";
          if(WafDeptProxy.getWafDeptById(deptid).getDeptName() != null && !(WafDeptProxy.getWafDeptById(deptid).getDeptName()).equals("")) {
            //得到登陆人的部门名称
              deptName = WafDeptProxy.getWafDeptById(this.getCurrentUser().getDeptId()).getDeptName();
          }
          System.out.println("机构问题查询操作人的部门名称为:" + deptName);
          //得到登录人的用户id
          String uid = this.getCurrentUser().getUserId();
          //得到用户的角色数组
          String[] role = WafUserProxy.getWafUserRoleIds(uid, conn);
          //判断是否拥有档案室角色
          boolean isDas = false;
          if(role != null && role.length > 0) {
              for(int i = 0; i < role.length; i++) {
                  if(role[i].trim().equals(das)) {
                      System.out.println("*******档案室角色用户登陆执行的查询!********");
                      isDas = true;
                  }
              } 
          }
      
      
      //得到登录人的部门id
            
    did  = this.getCurrentUser().getDeptId();
            
      if(WafDeptProxy.getWafDeptById(did) != null && !"".equals(WafDeptProxy.getWafDeptById(did))) {
             
      //得到父部门的id
             
      fdeptid  = WafDeptProxy.getWafDeptById(did).getParentDeptId();
             
    this.deptId = fdeptid;
             
    //得到父部门的名称
             
    fdept  = WafDeptProxy.getWafDeptById(fdeptid).getDeptName();
             
    this.deptName = fdept;

      
      
      //jsp页面获取
      WafUser user = (WafUser)request.getSession().getAttribute("user");

  • 相关阅读:
    字典的增删改查
    基础数据类型
    Linux程序优化实践
    Linuxt性能调优指南
    【MySQL】Percona Toolkits工具介绍及使用
    【MySQL】如何构建高性能MySQL系统?
    【MySQL】Event使用案例
    【MySQL】事件调度器 (Event Scheduler)
    【MySQL】mydumper工具介绍
    spu与sku的含义
  • 原文地址:https://www.cnblogs.com/is1988/p/2801433.html
Copyright © 2011-2022 走看看