waf平台常用方法总结
2012-12-04 15:17
204 查看
//得到当前登录人各种的信息
//得到配置文件中的档案室角色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");
相关文章推荐
- Linq To Sql常用方法使用总结
- Volley的常用方法总结
- java string类常用方法总结
- jQuery中常用的函数方法总结
- 总结 UIView常用属性 与方法UIButton UIlabel UIControl
- Android自定义控件常用方法总结
- GUAVA常用方法总结整理(list map string concurrent file)
- 常用html元素的取值和赋值方法总结
- EasyDemo*Map集合框架常用方法(个人总结)
- Tensorflow之常用方法总结(1)
- JQuery常用方法总结
- SqlServer 常用分页方法总结
- hibernateTemplate常用方法总结
- 关于ASP.NET页面打印技术的常用方法总结
- 黑马程序员------Objective-C------NSString常用方法总结
- 问题:C# ToString("P");结果:c#中的常用ToString()方法总结
- Java中常用字符串方法总结
- snmpwalk命令常用方法总结 转
- SharePoint 2010 常用技巧及方法总结(转)
- 有关浮动和常用清除方法总结