package com.engine.htxc.commonutil.user;

import com.api.formmode.page.util.Util;
import com.engine.htxc.commonutil.db.DbTools;
import weaver.hrm.User;

import java.io.Serializable;
import java.util.Map;

/**
 * @author K1810015
 * @version 1.0.0
 * @ClassName UserNew.java
 * @createTime 2022年06月24日 11:11:00
 */
public class UserHt extends User implements Serializable {
    public String getWorkcode() {
        return workcode;
    }

    public void setWorkcode(String workcode) {
        this.workcode = workcode;
    }
    public String workcode="";

    public UserHt(int id){
       super(id);
       Map<String,Object> map= getmain(Util.null2String(id));
       if(map==null || map.size()<=0){
           return ;
       }
       setWorkcode(Util.null2String(map.get("workcode")));

    }

    private Map<String,Object> getmain(String id){
        String sql=" select * from hrmresource where id=?";
        return new DbTools().getsqltomap(sql,id);
    }
}
