package com.ruoyi.common.enums; public enum RawMaterialCheckType implements BaseEnum{ RawMaterialCheckTypeAdmission(0, "入厂检"), RawMaterialCheckTypeWorkshop(1, "车间检"), RawMaterialCheckTypeFinal(2, "出厂检"); private final Integer value; private final String label; RawMaterialCheckType(Integer value, String label) { this.value = value; this.label = label; } public Integer getCode() { return value; } public String getValue() { return label; } /** * 根据值获取对应的枚举 */ public static RawMaterialCheckType fromValue(Integer value) { for (RawMaterialCheckType type : values()) { if (type.getValue().equals(value)) { return type; } } throw new IllegalArgumentException("未知的 RawMaterialCheckType 值: " + value); } }