<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="com.time.util.DateUtil" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="com.engine.workflow.biz.requestForm.FileBiz" %>
<%@ page import="weaver.hrm.User" %>
<%@ page import="weaver.hrm.HrmUserVarify" %>
<%@ page import="com.alibaba.fastjson.JSONArray" %>


<%--
  User: wangj
  Design Ideas：
  铭沣-判断当前用户是否是查看的人员卡片的用户上级，过滤tabs
    需要：判断当前用户是否是查看的人员卡片的用户上级，过滤tabs

--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%

    JSONObject data = new JSONObject();
    RecordSet rs = new RecordSet();
    boolean flag = false;

    String vuserid = Util.null2String(request.getParameter("vuserid"));
    String userid = Util.null2String(request.getParameter("userid"));
    String managerid = "";
    String sql = "select managerid from hrmresource where id = '"+vuserid+"'";
    rs.execute(sql);
    if(rs.next()){
        managerid = Util.null2String(rs.getString("managerid"));
    }
    if(!managerid.equals(userid)){
        flag = true;
        //获取自定义标签数据
        JSONArray arr = new JSONArray();
        sql = "select groupname from HrmResourceBaseTab";
        rs.execute(sql);
        while (rs.next()){
            String groupname = Util.null2String(rs.getString("groupname"));
            arr.add(groupname);
        }
        data.put("tabArr",arr);
    }

    data.put("flag",flag);
    out.print(data.toJSONString());
%>


