liujie
2025-05-27 4f46dade49d809e1b8ef92530309dc5f19e39582
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
package com.ruoyi.common.enums;
 
import lombok.Getter;
 
import java.util.Objects;
 
public enum SubmitStatusEnum {
    SUBMITTED(-1, ""),
    REJECT(0, "已退回"),
    PENDING_REVIEW(1, "待审核"),
    ACCEPT(3, "已接收");
 
    private final int value;
    private final String text;
 
    public static String getTextByValue(Integer value) {
        if (Objects.isNull(value)) {
            return "";
        }
        for (SubmitStatusEnum v : SubmitStatusEnum.values()) {
            if (v.getValue() == (value)) {
                return v.getText();
            }
        }
        return "";
    }
 
    SubmitStatusEnum(int value, String text) {
        this.text = text;
        this.value = value;
    }
 
    public int getValue() {
        return value;
    }
 
    public String getText() {
        return text;
    }
}