package com.ycl.enums.common;
|
|
import java.util.HashMap;
|
import java.util.Map;
|
|
public enum DictTypeEnum {
|
QUESTION_TYPE("01", "问题类型"),
|
EVENT_GRADE_TYPE("02", "事件等级"),
|
IDENTITY_TYPE("03", "证件类型"),
|
CULTURE_TYPE("04", "文化"),
|
NATIONALITY_TYPE("05", "民族"),
|
ILLEGAL_BUILD_TYP("06", "违建类型"),
|
USER_TYPE("07", "用户类型"),
|
ROLE_TYPE("09", "角色类型"),
|
DEPART_TYPE("08", "部门类型"),
|
STREET_TYPE("10", "乡镇街道--废弃"),
|
COMMUNITY_TYPE("11", "所辖村(社区)--废弃"),
|
BAYONET_APPLICABLE_TYPE("12", "卡口适用类型"),
|
BAYONET_FRONTEND_TYPE("13", "卡口前端类型"),
|
BAYONET_PASSAGEWAY_TYPE("14", "卡口出入城类型");
|
|
private String code;
|
private String type;
|
|
DictTypeEnum(String code, String type) {
|
this.code = code;
|
this.type = type;
|
}
|
|
public String getCode() {
|
return code;
|
}
|
|
public String getType() {
|
return type;
|
}
|
|
/**
|
* 获得所有枚举类型到map
|
* @return
|
*/
|
public static Map<String,String> getAllToMap() {
|
Map<String,String> map = new HashMap<>();
|
for (DictTypeEnum alarmType : values()) {
|
map.put(alarmType.getCode(), alarmType.getType());
|
}
|
return map;
|
}
|
}
|