Compare commits
2 Commits
c681dcfd82
...
888db0baf7
| Author | SHA1 | Date |
|---|---|---|
|
|
888db0baf7 | |
|
|
636750e197 |
|
|
@ -0,0 +1,44 @@
|
|||
package org.qinan.safetyeval.domain.constant;
|
||||
|
||||
/**
|
||||
* 专业能力
|
||||
*/
|
||||
public enum ProfessionalCapabilityEnum {
|
||||
|
||||
MINING(1, "采矿"),
|
||||
SAFETY(2, "安全"),
|
||||
MACHINERY(3, "机械"),
|
||||
VENTILATION(4, "通风"),
|
||||
GEOLOGY(5, "地质"),
|
||||
HYDRAULIC_STRUCTURE(6, "水工结构"),
|
||||
ELECTRICAL(7, "电气"),
|
||||
MECHANICAL_ENGINEERING(8, "机械工程");
|
||||
|
||||
private final int code;
|
||||
private final String name;
|
||||
|
||||
ProfessionalCapabilityEnum(int code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public static ProfessionalCapabilityEnum ofCode(Integer code) {
|
||||
if (code == null) {
|
||||
return null;
|
||||
}
|
||||
for (ProfessionalCapabilityEnum item : values()) {
|
||||
if (item.code == code) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package org.qinan.safetyeval.domain.constant;
|
||||
|
||||
/**
|
||||
* 资质等级
|
||||
*/
|
||||
public enum QualificationLevelEnum {
|
||||
|
||||
LEVEL_1(1, "一级"),
|
||||
LEVEL_2(2, "二级"),
|
||||
LEVEL_3(3, "三级"),
|
||||
CERTIFIED_SAFETY_ENGINEER(4, "注安");
|
||||
|
||||
private final int code;
|
||||
private final String name;
|
||||
|
||||
QualificationLevelEnum(int code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public static QualificationLevelEnum ofCode(Integer code) {
|
||||
if (code == null) {
|
||||
return null;
|
||||
}
|
||||
for (QualificationLevelEnum item : values()) {
|
||||
if (item.code == code) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue