package com.ximai.mes.constant;

/**
 * 任务单状态
 * @ Author: chicheng.li
 * @ Date  : 2024/2/4
 */
public enum CalPlanWorkunitEnum {

    /**
     * work
     */
    YES(1, "上班"),

    /**
     *· workend
     */
    NO(2,"放假");

    /**
     * Lock type
     */
    private final Integer type;
    private final String value;

    CalPlanWorkunitEnum(Integer type, String value) {
        this.type = type;
        this.value = value;
    }

    public Integer getType() {
        return type;
    }

    public String getValue() {
        return value;
    }

    public static String get(Integer type){
        for(CalPlanWorkunitEnum temp : CalPlanWorkunitEnum.values()){
            if(temp.getType().equals(type)){
                return temp.getValue();
            }
        }
        return "未知类型";
//        throw new RuntimeException("异常上机类型");
    }
}
