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");

  • 相关阅读:
    1. cocos creator 连接服务端
    cocos creator 中的粒子效果
    cocos creator
    5.4 笔记
    事后诸葛亮
    PHP之魔术方法
    结队编程--作业一
    团队作业9——事后分析(Beta版本)
    团队作业8——测试与发布(Beta阶段)
    Beta版本冲刺计划
  • 原文地址:https://www.cnblogs.com/is1988/p/2801433.html
Copyright © 2011-2022 走看看