邮电院人员权限控制

来源:互联网 发布:网络控制器驱动下载 编辑:程序博客网 时间:2024/04/28 16:42

boolean isRLZY = UserProfileUtil.isRole(request, SystemConfig.getValue("RLZY_ADMIN_ROLE"));//人力资源管理员
boolean isYz=UserProfileUtil.isRole(request,  SystemConfig.getValue("YZ_QUERY_ROLE"));//院领导查询
boolean isAll=UserProfileUtil.isRole(request,  SystemConfig.getValue("ALL_BIZ_QUERY_ROLE"));//全业务查询角色

  
boolean isYZG=UserProfileUtil.isRole(request,  SystemConfig.getValue("YZG_ROLE"));  //院主管
boolean isSZG=UserProfileUtil.isRole(request,  SystemConfig.getValue("SZG_ROLE"));  //所主管
boolean isXZWY=UserProfileUtil.isRole(request,  SystemConfig.getValue("YUAN_XZWY_ROLE"));  //院行政文员

 

 

String CITY = request.getParameter("CITY");
 String DEPT_ID = request.getParameter("DEPT_ID");
    if (DEPT_ID == null)
  DEPT_ID = "";
    if (CITY == null)
  CITY = "";
 if (!profile.isAdmin()
   && !isRlzygly &&!isAllBizAdmin) {//非系统管理员,非人力资源管理员,全业务查询角色( 不知道什么东西到现在还不懂)
  if (CITY.length() == 0) {
   CITY = profile.getCity();
  }
 }
 

 

 if(profile.isAdmin()||isRlzygly||isAllBizAdmin){//系统管理员,人力资源管理员
  
 }else if(isYzg||isXzwy||isBmld){//院主管,院行政文员,部门领导
     disable="disabled";
 }
 


 if(profile.isAdmin()||isRlzygly||isAllBizAdmin){//系统管理员,人力资源管理员,全业务查询角色( 不知道什么东西到现在还不懂)
  
    }else if(isYzg||isXzwy||(isBmld&&!isSzg)){//院主管,院行政文员,部门领导非所所主管
    //disable2="disabled";
    }else if(isSzg){
     disable2="disabled";
     DEPT_ID=String.valueOf(profile.getDeptId());      取得当前人的部门ID
   }

 

 

public static String valueOf(int i) {
        return Integer.toString(i, 10);
    }

 

 

public int length() {
        return count;
    }

 

 /** The count is the number of characters in the String. */
    》》private final int count;

 

 

 /**
   * 得到地区信息
   * @return
   */
  public String getCity();

/**
   * 得到所属部门ID
   * @return
   */
  public int getDeptId();

 

Map.class

V put(K key, V value);

 

 

Boolean.class

 

public final class Boolean implements java.io.Serializable,
                                      Comparable<Boolean>{}

 

 public static Boolean valueOf(String s) {
 return toBoolean(s) ? TRUE : FALSE;
    }

 

 

 

boolean isMy = Boolean.valueOf(request.getParameter("isMy")).booleanValue();

 

 /**
     * Returns the value of this <tt>Boolean</tt> object as a boolean
     * primitive.
     *
     * @return  the primitive <code>boolean</code> value of this object.
     */
  >>  public boolean booleanValue() {
>> return value;
 >>   }

 

boolean isMy = Boolean.valueOf(request.getParameter("isMy")).booleanValue();

 

String disable="";
String disable2="";

 

  <tr bgcolor="#D0DDF0">
     <%if( !isMy){%>
     <td align="right">部门:</td>
    </td>
   <td colspan=3>
     <jsp:include page="//system/dept/includeDept.jsp">
           <jsp:param name="formName" value="formQuery" />
           <jsp:param name="elementName1" value="CITY" />
           <jsp:param name="elementName2" value="DEPT_ID" />
           <jsp:param name="element2Type" value="0"/>
           <jsp:param name="disable" value="<%=disable %>" />
           <jsp:param name="disable2" value="<%=disable2 %>" />
           <jsp:param name="elementName1Value" value="<%=CITY %>" />
           <jsp:param name="elementName2Value" value="<%=DEPT_ID %>" />
          </jsp:include>
    </td>
        <%}%>
     </tr>

原创粉丝点击