package cn.com.ctop.oa.modules.enums;


import cn.com.ctop.common.module.utils.Check;

public enum SpNoEnum {


    control1("Attendance", "假勤"),
    control2("Vacation", "请假"),
    control3("PunchCorrection", "补卡"),
    type1("1", "请假"),
    type2("2", "补卡"),
    type3("3", "出差"),
    type4("4", "外出"),
    type5("5", "加班"),
    vacation1("101","年假"),
    vacation2("102","事假"),
    vacation3("103","病假"),
    vacation4("104","调休"),
    vacation5("105","婚假"),
    vacation6("106","产假"),
    vacation7("107","陪产假"),
    vacation8("108","其他"),
    vacation9("109","丧假");
    private String code;
    private String name;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static SpNoEnum getSpNoEnum(String code) {
        if (Check.isNull(code)) {
            return null;
        }
        for (SpNoEnum value : SpNoEnum.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }


    private SpNoEnum(String code, String name) {
        this.code = code;
        this.name = name;

    }
}
