package com.engine.htsc.branch.approvalChain.model;

import com.weaver.general.Util;
import weaver.conn.RecordSet;

public class FzjgUser {
    private String id;
    private String loginid;
    private String lastname;
    private String workCode;    //工号
    private String seclevel;    //安全等级
    private String deptDepth;    //部门深度
    private String roleCode;    //人员角色ST_1~ST_8
    private String jobGrade;    //是否是领导，负责人根据seclevel是否>=50判断
    private String departmentId;    //部门id
    private FzjgDept fzjgDept;

    public FzjgUser() {
    }

    public FzjgUser(String id) {
        String sql = "select a.id, a.loginid, a.lastname, a.seclevel,a.workCode, a.departmentId from hrmresource a where a.id = " + id;
        this.id = id;
        RecordSet rs = new RecordSet();
        rs.execute(sql);
        if(rs.next()){
            this.loginid = Util.null2String(rs.getString("loginid"));
            this.lastname = Util.null2String(rs.getString("lastname"));
            this.workCode = Util.null2String(rs.getString("workCode"));
            this.seclevel = Util.null2String(rs.getString("seclevel"));
            this.departmentId = Util.null2String(rs.getString("departmentId"));
            this.fzjgDept = new FzjgDept(Util.null2String(rs.getString("departmentId")));
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLoginid() {
        return loginid;
    }

    public void setLoginid(String loginid) {
        this.loginid = loginid;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    public String getSeclevel() {
        return seclevel;
    }

    public void setSeclevel(String seclevel) {
        this.seclevel = seclevel;
    }

    public FzjgDept getFzjgDept() {
        return fzjgDept;
    }

    public void setFzjgDept(FzjgDept fzjgDept) {
        this.fzjgDept = fzjgDept;
    }

    public String getDeptDepth() {
        return deptDepth;
    }

    public void setDeptDepth(String deptDepth) {
        this.deptDepth = deptDepth;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getJobGrade() {
        return jobGrade;
    }

    public void setJobGrade(String jobGrade) {
        this.jobGrade = jobGrade;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getWorkCode() {
        return workCode;
    }

    public void setWorkCode(String workCode) {
        this.workCode = workCode;
    }
}
