Newer
Older
newfiber-data-adapter / src / main / java / org / springnewfiber / dataadapter / xf / XfDataEnum.java
package org.springnewfiber.dataadapter.xf;

import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

@Getter
public enum XfDataEnum {
    ChnlData("ChnlData","港渠信息"),
    ForcastData("ForcastData","汉口水情"),
    LakeData("LakeData","湖泊监测数据"),
    Meteorological("Meteorological","气象站实时监测数据"),
    PptnData("PptnData","降雨量"),
    PumpData("PumpData","泵站信息"),
    RiverData("RiverData","河道信息"),
    SoilData("SoilData","土壤墒情"),
    WasData("WasData","涵闸监测数据"),
    WetlogData("WetlogData","渍水实时数据"),
    ;
    private String code;
    private String remark;

    XfDataEnum(String code, String remark) {
        this.code = code;
        this.remark = remark;
    }
    public static XfDataEnum match(String code){
        for (XfDataEnum value : XfDataEnum.values()) {
            if(StringUtils.equalsIgnoreCase(value.getCode(),code)){
                return value;
            }
        }
        return null;
    }
}