package com.ruoyi.common.enums;
|
|
import lombok.Getter;
|
|
/**
|
* @author xiaochen
|
* @ClassName Disable
|
* @Description
|
* @date 2022-06-08 16:55
|
*/
|
public enum StudyReportTypeEnum {
|
/*1=可研报告 2=可行报告 3=工艺开发工具 4=验证与发布*/
|
FEASIBILITY_STUDY_REPORT("K1", "可研报告"),
|
FEASIBLE_REPORT("K2", "可行报告"),
|
PROCESS_DEVELOPMENT_TOOLS("K3", "工艺开发工具"),
|
VERIFICATION_RELEASE("K4", "验证与发布");
|
|
@Getter
|
private String desc;
|
|
|
@Getter
|
private String code;
|
|
|
StudyReportTypeEnum(String code, String desc) {
|
this.code = code;
|
this.desc = desc;
|
}
|
|
/**
|
* 通过code获取枚举
|
*
|
* @param code
|
* @return
|
*/
|
public static StudyReportTypeEnum fromCode(Integer code) {
|
StudyReportTypeEnum[] resultTypes = StudyReportTypeEnum.values();
|
for (StudyReportTypeEnum resultType : resultTypes) {
|
if (code.equals(resultType.getCode())) {
|
return resultType;
|
}
|
}
|
return null;
|
}
|
}
|