package jnpf.enums.attendance;

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

/**
 * (审批类型 1.常规补卡审批 2.调整出勤结果审批 3.外勤审批 4.请假审批 5.加班审批)
 */
public enum ApprovalSettingTypeEnum {
    SECONDED(0, "借调审批"),
    ROUTINE(1,"补卡审批"),
//    ACTION_RESULT(2,"调整出勤结果审批"),
    ACTION_RESULT(2,"调整出勤结果,下级考勤组调整出勤审批"),
    OUT(3,"外勤审批"),
    LEAVE(4,"请假审批"),
    OVERTIME(5,"加班审批"),

    GO_OUT(6, "外出审批"),
    BUSINESS_TRIP(7, "出差审批"),
    ;

    Map<String, String> map = new HashMap<>();

    public static String getByCode(Integer code) {
        ApprovalSettingTypeEnum[] values = values();
        for (ApprovalSettingTypeEnum value : values) {
            if (code.equals(value.code)) {
                return value.msg;
            }
        }
        return null;
    }

    Integer code;
    String msg;

    ApprovalSettingTypeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
