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
package cn.iocoder.yudao.module.mes.enums.safety;
 
import lombok.AllArgsConstructor;
import lombok.Getter;
 
/**
 * 安全生产 - 事故处理状态枚举
 *
 * @author 超级管理员
 */
@Getter
@AllArgsConstructor
public enum SafetyAccidentStatusEnum {
 
    REPORTED("REPORTED", "已登记"),
    INVESTIGATING("INVESTIGATING", "调查中"),
    HANDLED("HANDLED", "已处理"),
    CLOSED("CLOSED", "已结案");
 
    private final String status;
    private final String name;
 
    public static String getNameByStatus(String status) {
        for (SafetyAccidentStatusEnum value : values()) {
            if (value.getStatus().equals(status)) {
                return value.getName();
            }
        }
        return status;
    }
 
}