package com.yeejoin.amos.boot.module.hygf.api.Enum;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum RectificationOrderEnum {


    施工("ProcessEngineering", "area,design,engineering"),
    并网("GridConnected", "bw-area,bw-design,bw-engineering"),
    验收("AcceptanceCheck", "ys-area,ys-tourong,ys-fawu,ys-zichan");

    /**
     * 名称，描述
     */
    private String name;
    /**
     * 编码
     */
    private String code;

    public static RectificationOrderEnum getNodeByCode(String code) {
        RectificationOrderEnum dealerReviewEnum = null;
        for(RectificationOrderEnum type: RectificationOrderEnum.values()) {
            if (type.getCode().equals(code)) {
                dealerReviewEnum = type;
                break;
            }
        }
        return dealerReviewEnum;
    }

    public static RectificationOrderEnum getNodeByName(String name) {
        RectificationOrderEnum dealerReviewEnum = null;
        for(RectificationOrderEnum type: RectificationOrderEnum.values()) {
            if (type.getName().equals(name)) {
                dealerReviewEnum = type;
                break;
            }
        }
        return dealerReviewEnum;
    }





}
