package com.ruoyi.common.enums;
|
|
import lombok.Getter;
|
|
/**
|
* @author xiaochen
|
* @ClassName Disable
|
* @Description
|
* @date 2022-06-08 16:55
|
*/
|
public enum ProjectStageEnum {
|
/*项目阶段 1=实验室开发阶段 2=中式试验阶段 3=生产验证试验阶段*/
|
DEVELOPMENT_PHASE("LS", "实验室开发阶段"),
|
CHINESE_STYLE_EXPERIMENT("PS", "中式试验阶段"),
|
PRODUCTION_VALIDATION("IV", "生产验证试验阶段");
|
|
@Getter
|
private String desc;
|
|
|
@Getter
|
private String code;
|
|
|
ProjectStageEnum(String code, String desc) {
|
this.code = code;
|
this.desc = desc;
|
}
|
|
/**
|
* 通过code获取枚举
|
*
|
* @param code
|
* @return
|
*/
|
public static ProjectStageEnum fromCode(Integer code) {
|
ProjectStageEnum[] resultTypes = ProjectStageEnum.values();
|
for (ProjectStageEnum resultType : resultTypes) {
|
if (code.equals(resultType.getCode())) {
|
return resultType;
|
}
|
}
|
return null;
|
}
|
}
|