package weaver.interfaces.htsc.GlobatTools;

import com.engine.integration.util.StringUtils;
import weaver.interfaces.htsc.GlobatTools.DBTools;
import weaver.interfaces.htsc.GlobatTools.JAVATools;

import java.text.MessageFormat;
import java.util.List;
import java.util.Map;

/**
 * @author K1810015
 * @version 1.0.0
 * @ClassName DeptUtils.java
 * @createTime 2022年03月24日 10:48:00
 * @Remark JAVATools命名规范不是很严谨所有将对应的类分解重写
 *hrmdepartment对应的实体工具类
 */
public class DeptUtils {

    /**
     * @title getDepartmentCodeToUserids
     * @author K1810015
     * @updateTime 2022/3/24 10:52
     * @Remark 根据部门编号获取
     * @throws
     */
    public static List getDepartmentCodeToUserids(String departmentcode){
        if(StringUtils.isBlank(departmentcode)){
            return null;
        }
        String sql="select * from hrmresource where departmentid in ( select id from hrmdepartment where departmentcode=''{0}'')";
        sql=MessageFormat.format(sql,departmentcode);
        return JAVATools.GetTableToListMap(sql,null);
    }
}
