lead
7 天以前 e2339db8255e350596310ab27bebe5b4a014d5aa
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
package cn.iocoder.yudao.module.mes.enums.safety;
 
import lombok.AllArgsConstructor;
import lombok.Getter;
 
/**
 * 安全生产 - 高危作业票状态枚举
 *
 * @author 超级管理员
 */
@Getter
@AllArgsConstructor
public enum SafetyPermitStatusEnum {
 
    DRAFT("DRAFT", "草稿"),
    PENDING("PENDING", "待审批"),
    APPROVED("APPROVED", "已批准"),
    REJECTED("REJECTED", "已驳回"),
    IN_PROGRESS("IN_PROGRESS", "作业中"),
    CLOSED("CLOSED", "已完结"),
    CANCELLED("CANCELLED", "已作废");
 
    private final String status;
    private final String name;
 
    public static String getNameByStatus(String status) {
        for (SafetyPermitStatusEnum value : values()) {
            if (value.getStatus().equals(status)) {
                return value.getName();
            }
        }
        return status;
    }
 
}