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
36
37
38
| package org.jeecg.modules.tms.enums;
|
| import lombok.Getter;
|
| /**
| * 工具流通状态枚举
| */
| @Getter
| public enum ToolCirculationStatus {
| IN_STOCK("1", "在库"),
| BORROWED("2", "在借"),
| REPAIRING("3", "在修"),
| INSPECTING("4", "在检"),
| GRINDING("5", "在磨"),
| SCRAPPED("6", "报废");
|
| private final String value;
| private final String description;
|
| ToolCirculationStatus(String value, String description) {
| this.value = value;
| this.description = description;
| }
|
| /**
| * 根据状态值获取枚举实例
| * @param status 状态值
| * @return 枚举实例或null
| */
| public static ToolCirculationStatus fromStatus(String status) {
| for (ToolCirculationStatus value : values()) {
| if (value.getValue().equals(status)) {
| return value;
| }
| }
| return null;
| }
| }
|
|