eight
2024-10-16 d8171199e6167ed1c27b838512c2863abf0d1020
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
package cn.lihu.jh.module.ecg.enums;
 
import cn.hutool.core.util.ObjUtil;
import cn.lihu.jh.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
 
import java.util.Arrays;
 
/**
 * 通用状态枚举
 *
 * @author 芋道源码
 */
@Getter
@AllArgsConstructor
public enum DevRentStateEnum implements IntArrayValuable {
    FREE(0, "待装机"),
    READY(5, "已领取"),
    INSTALLED(10, "已装机"),
    DISMANTLED(20, "已拆机"),
    DATAENTERED(25, "已录入"),
    READY_CANCELLED(30, "领用放弃"),
    INSTALL_CANCELLED(35, "安装放弃"),
    LOST(40, "已遗失"),
    ROUTINE_CANCELLED(50, "常规检查放弃"),
    ROUTINE_FINISH( 60, "常规检查完成");
 
    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DevRentStateEnum::getState).toArray();
 
    /**
     * 状态值
     */
    private final Integer state;
    /**
     * 状态名
     */
    private final String name;
 
    @Override
    public int[] array() {
        return ARRAYS;
    }
 
    public boolean isEqual(Integer state) {
        return ObjUtil.equal(this.state, state);
    }
}