package com.ruoyi.common.enums; public enum RawMaterialInspectState implements BaseEnum{ RawMaterialInspectStateUnsubmitted(0, "未提交"), RawMaterialInspectStateSubmitted(1, "已提交"); private final Integer value; private final String label; RawMaterialInspectState(Integer value, String label) { this.value = value; this.label = label; } public Integer getCode() { return value; } public String getValue() { return label; } /** * 根据值获取对应的枚举 */ public static RawMaterialInspectState fromValue(Integer value) { for (RawMaterialInspectState type : values()) { if (type.getValue().equals(value)) { return type; } } throw new IllegalArgumentException("未知的 RawMaterialInspectState 值: " + value); } }