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
44
45
46
| package cn.iocoder.yudao.module.mes.enums.pd;
|
| import cn.iocoder.yudao.framework.common.core.ArrayValuable;
| import lombok.Getter;
| import lombok.RequiredArgsConstructor;
|
| import java.util.Arrays;
|
| /**
| * 产品设计-技术确认函状态
| *
| * @author 超级管理员
| */
| @RequiredArgsConstructor
| @Getter
| public enum MesPdTechConfirmStatusEnum implements ArrayValuable<Integer> {
|
| DRAFT(0, "草稿"),
| PENDING_AUDIT(1, "待审核"),
| AUDITED(2, "已审核"),
| CUSTOMER_CONFIRMED(3, "客户已确认"),
| REJECTED(4, "审核不通过");
|
| private final Integer status;
| private final String name;
|
| public static final Integer[] ARRAYS = Arrays.stream(values()).map(MesPdTechConfirmStatusEnum::getStatus).toArray(Integer[]::new);
|
| public static String getNameByStatus(Integer status) {
| if (status == null) {
| return null;
| }
| for (MesPdTechConfirmStatusEnum e : values()) {
| if (e.getStatus().equals(status)) {
| return e.getName();
| }
| }
| return null;
| }
|
| @Override
| public Integer[] array() {
| return ARRAYS;
| }
|
| }
|
|