1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| package org.jeecg.modules.tms.enums;
|
| import lombok.Getter;
|
| /**
| * 刃磨状态枚举
| */
| @Getter
| public enum SharpenStatus {
| PENDING("1", "待刃磨"),
| IN_PROGRESS("2", "刃磨中"),
| COMPLETED("3", "已完成");
|
| private final String value;
| private final String description;
|
| SharpenStatus(String value, String description) {
| this.value = value;
| this.description = description;
| }
|
| /**
| * 根据状态值获取枚举实例
| * @param status 状态值
| * @return 枚举实例或null
| */
| public static SharpenStatus fromStatus(String status) {
| for (SharpenStatus value : values()) {
| if (value.getValue().equals(status)) {
| return value;
| }
| }
| return null;
| }
| }
|
|