package com.tofly.gpsboot.common.system;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.util.StringUtils;

/**
 * 是否派工
 * @author Zev
 */
@Getter
@AllArgsConstructor
public enum IsDispatchingEnum {
    /**
     *
     */

    IS_DISPATCHING_NO("0","未派工"),
    IS_DISPATCHING_YES("1","已派工"),
    ;
    /**
     * 编码
     */
    private String code;
    /**
     * 内容
     */
    private String value;

    public static String getCodeForValue(String code) {
        String path = "";
        if (StringUtils.isEmpty(code)) {
            return path;
        }

        for (IsDispatchingEnum e : IsDispatchingEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                path = e.value;
                break;
            }
        }
        return path;
    }
}
