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
| package com.sinata.system.enums;
|
| import lombok.Getter;
| import lombok.AllArgsConstructor;
|
| @Getter
| @AllArgsConstructor
| public enum AttachmentTypeEnum {
| PROTECTION_EQUIPMENT(1, "防护器具附件"),
| PROTECTION_TASK(2, "防护作业附件"),
| PROTECTION_REGULATION(3, "规章制度附件"),
| CONTRACT(4, "合同附件"),
| REGULATORY(5, "检查附件");
|
| private final Integer code;
| private final String desc;
|
| public static AttachmentTypeEnum getEnumByCode(Integer code) {
| for (AttachmentTypeEnum e : AttachmentTypeEnum.values()) {
| if (e.code.equals(code)) {
| return e;
| }
| }
| return null;
| }
| }
|
|