package com.ruoyi.common.enums;
|
|
import lombok.Getter;
|
|
/**
|
* @author xiaochen
|
* @ClassName Disable
|
* @Description
|
* @date 2022-06-08 16:55
|
*/
|
public enum QaReportTypeEnum {
|
/*1=检测项报告、2=中试 、3=生产验证分析报告;4=辅料*/
|
TEST_REPORT("H1", "检测项报告"),
|
TEST_PILOT("H2", "中试"),
|
PRODUCTION_VERIFICATION_ANALYSIS_REPORT("H3", "生产验证分析报告"),
|
AUXILIARY_MATERIALS("H4", "辅料");
|
|
@Getter
|
private String desc;
|
|
|
@Getter
|
private String code;
|
|
|
QaReportTypeEnum(String code, String desc) {
|
this.code = code;
|
this.desc = desc;
|
}
|
|
/**
|
* 通过code获取枚举
|
*
|
* @param code
|
* @return
|
*/
|
public static QaReportTypeEnum fromCode(Integer code) {
|
QaReportTypeEnum[] resultTypes = QaReportTypeEnum.values();
|
for (QaReportTypeEnum resultType : resultTypes) {
|
if (code.equals(resultType.getCode())) {
|
return resultType;
|
}
|
}
|
return null;
|
}
|
}
|