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

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

public class FzjgDept {
    private String id;
    private String departmentName;
    private String departmentCode;
    private String deptTypeCode;
    private String supDepId;    //上级部门
    private String deptDepth;    //部门深度
    private String deptDirectors;    //部门负责人
    private String deptLeaders;    //部门领导
    
    public FzjgDept() {
    }
    
    public FzjgDept(String id) {
        this.id = id;
        String sql = "select a.id,a.supDepId, a.departmentName,a.departmentCode, b.deptTypeCode ,b.deptDepth ,b.deptDirectors, b.deptLeaders from hrmdepartment a,hrmdepartmentdefined b where a.id = b.deptid and a.id = " + id;
        this.id = id;
        RecordSet rs = new RecordSet();
        rs.execute(sql);
        if(rs.next()){
            this.supDepId = Util.null2String(rs.getString("supDepId"));
            this.departmentCode = Util.null2String(rs.getString("departmentCode"));
            this.departmentName = Util.null2String(rs.getString("departmentName"));
            this.deptTypeCode = Util.null2String(rs.getString("deptTypeCode"));
            this.deptDepth = Util.null2String(rs.getString("deptDepth"));
            this.deptDirectors = Util.null2String(rs.getString("deptDirectors"));
            this.deptLeaders = Util.null2String(rs.getString("deptLeaders"));
        }
    }
    
    public String getId() {
        return id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    public String getDepartmentName() {
        return departmentName;
    }
    
    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }
    
    public String getDeptTypeCode() {
        return deptTypeCode;
    }
    
    public void setDeptTypeCode(String deptTypeCode) {
        this.deptTypeCode = deptTypeCode;
    }
    
    public String getDeptDepth() {
        return deptDepth;
    }
    
    public void setDeptDepth(String deptDepth) {
        this.deptDepth = deptDepth;
    }
    
    public String getDeptDirectors() {
        return deptDirectors;
    }
    
    public void setDeptDirectors(String deptDirectors) {
        this.deptDirectors = deptDirectors;
    }
    
    public String getDeptLeaders() {
        return deptLeaders;
    }
    
    public void setDeptLeaders(String deptLeaders) {
        this.deptLeaders = deptLeaders;
    }
    
    public String getSupDepId() {
        return supDepId;
    }
    
    public void setSupDepId(String supDepId) {
        this.supDepId = supDepId;
    }
    
    public String getDepartmentCode() {
        return departmentCode;
    }
    
    public void setDepartmentCode(String departmentCode) {
        this.departmentCode = departmentCode;
    }
}
