4 changed files with 72 additions and 1 deletions
			
			
		@ -0,0 +1,59 @@ | 
				
			|||
package com.epmet.commons.tools.enums; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 社区自组织增加分类:文化队伍、楼委会、老友俱乐部、治安巡逻队、其他 | 
				
			|||
 */ | 
				
			|||
public enum SelfOrgCategoryEnum { | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 环境变量枚举 | 
				
			|||
     */ | 
				
			|||
 | 
				
			|||
    WHDW("whdw", "文化队伍", "#0091ed", 1), | 
				
			|||
    LWH("lwh", "楼委会", "#0091ed", 2), | 
				
			|||
    LYJLB("lyjlb", "老友俱乐部", "#0091ed", 3), | 
				
			|||
    ZAXLD("zaxld", "治安巡逻队", "#0091ed", 4), | 
				
			|||
    OTHER("other", "其他", "#0091ed", 5), | 
				
			|||
    ; | 
				
			|||
 | 
				
			|||
    private final String code; | 
				
			|||
    private final String name; | 
				
			|||
    private final String color; | 
				
			|||
    private final Integer sort; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
    SelfOrgCategoryEnum(String code, String name, String color, Integer sort) { | 
				
			|||
        this.code = code; | 
				
			|||
        this.name = name; | 
				
			|||
        this.color = color; | 
				
			|||
        this.sort = sort; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public static SelfOrgCategoryEnum getEnum(String code) { | 
				
			|||
        SelfOrgCategoryEnum[] values = SelfOrgCategoryEnum.values(); | 
				
			|||
        for (SelfOrgCategoryEnum value : values) { | 
				
			|||
            if (value.getCode().equals(code)) { | 
				
			|||
                return value; | 
				
			|||
            } | 
				
			|||
        } | 
				
			|||
        return SelfOrgCategoryEnum.OTHER; | 
				
			|||
 | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public String getCode() { | 
				
			|||
        return code; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public String getName() { | 
				
			|||
        return name; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public String getColor() { | 
				
			|||
        return color; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public Integer getSort() { | 
				
			|||
        return sort; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
} | 
				
			|||
					Loading…
					
					
				
		Reference in new issue