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
47
48
49
| package cn.lihu.jh.module.ecg.enums;
|
| import cn.lihu.jh.framework.common.core.IntArrayValuable;
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| import java.util.Arrays;
|
| /**
| * 通用状态枚举
| *
| * @author 芋道源码
| */
| @Getter
| @AllArgsConstructor
| public enum BedStatusEnum implements IntArrayValuable {
| CLOSED((byte)0, "已关闭"),
| CLOSING((byte)1, "关闭中"),
| OPENING((byte)10, "已开通"),
| DOCTOR_ON((byte)20, "有医生"),
| PAUSE((byte)30, "暂停");
|
| public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BedStatusEnum::getStatus).toArray();
|
| /**
| * 状态值
| */
| private final Byte status;
| /**
| * 状态名
| */
| private final String name;
|
| @Override
| public int[] array() {
| return ARRAYS;
| }
|
| /*
| public static boolean isEnable(Integer status) {
| return ObjUtil.equal(ENABLE.status, status);
| }
|
| public static boolean isDisable(Integer status) {
| return ObjUtil.equal(DISABLE.status, status);
| }
| */
|
| }
|
|