package com.engine.organization.util.field;

import weaver.conn.RecordSet;

import java.util.HashMap;
import java.util.Map;

/**
 * @author:dxfeng
 * @createTime: 2022/12/20
 * @version: 1.0
 */
public class StaticFieldName {
    private static final Map<String, String> fieldNameMap;
    public static final String zdzjFieldName;
    // 等级方案
    public static final String schemeFieldName;
    // 职等
    public static final String levelFieldName;
    // 职级
    public static final String gradeFieldName;
    // 岗位序列
    public static final String sequenceFieldName;

    static {
        fieldNameMap = new HashMap<>();
        RecordSet rs = new RecordSet();
        rs.execute("select fieldlabel ,fieldname  from jcl_org_field");
        while (rs.next()) {
            fieldNameMap.put(rs.getString("fieldlabel"), rs.getString("fieldname"));
        }
        zdzjFieldName = fieldNameMap.get("职等职级");
        schemeFieldName = fieldNameMap.get("等级方案");
        levelFieldName = fieldNameMap.get("职等");
        gradeFieldName = fieldNameMap.get("职级");
        sequenceFieldName = fieldNameMap.get("岗位序列");
    }

}
