TFSJ.java 625 Bytes
package com.bsth.data.notice.entity;

public enum TFSJ {
    ZDHD("1", "重大活动"),
    ELTQ("2", "恶劣天气"),
    JTSG("3", "交通事故"),
    DLYD("4", "道路拥堵");

    private  String code;
    private  String description;

    TFSJ(String code, String description) {
        this.code = code;
        this.description = description;
    }


    public static String getDescription(String number){
        String description ="";
        for (TFSJ e : TFSJ.values()) {
            if(e.code.equals(number)){
                return e.description;
            }
        }
        return description;
    }

}