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
39
40
41
42
43
| package com.ruoyi.outsourcing.enums;
|
| import com.ruoyi.common.enums.BaseEnum;
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| /**
| * 委外订单状态枚举
| */
| @Getter
| @AllArgsConstructor
| public enum OutsourcingOrderStatusEnum implements BaseEnum<Integer> {
|
| DRAFT(0, "草稿"),
| CONFIRMED(1, "已确认"),
| COMPLETED(2, "已完成"),
| CANCELLED(3, "已作废");
|
| private final Integer value;
| private final String label;
|
| @Override
| public Integer getCode() {
| return value;
| }
|
| @Override
| public String getValue() {
| return label;
| }
|
| public static String getLabelByValue(Integer value) {
| if (value == null) {
| return "未知状态";
| }
| for (OutsourcingOrderStatusEnum status : values()) {
| if (status.getCode().equals(value)) {
| return status.getValue();
| }
| }
| return "未知状态";
| }
| }
|
|