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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
| package com.ruoyi.system.domain.enums;
|
| public enum ImageTypeEnum {
|
| DEFAULT(0, "默认"),
|
| INFORMED_CONSENT(1, "知情同意书"),
| BRZL(2, "病人资料"),
| CZJL(3, "操作记录"),
| CCQ(4, "出车前"),
| CCH(5, "出车后"),
| SEAT_BELT(6, "绑安全带图片");
| // 知情同意书 1
| // 病人资料 2
| // 操作记录 3
| // 出车前 4
| // 出车后 5
| // 系安全带 6
| private final Integer code;
| private final String description;
|
| ImageTypeEnum(Integer code, String description) {
| this.code = code;
| this.description = description;
| }
|
| public Integer getCode() {
| return code;
| }
|
| public String getDescription() {
| return description;
| }
|
| /**
| * 根据代码获取枚举
| */
| public static ImageTypeEnum getByCode(Integer code) {
| if (code == null) {
| return DEFAULT;
| }
|
| for (ImageTypeEnum type : values()) {
| if (type.getCode().equals(code)) {
| return type;
| }
| }
| return DEFAULT;
| }
|
| /**
| * 判断是否为知情同意书
| */
| public boolean isInformedConsent() {
| return this == INFORMED_CONSENT;
| }
|
| /**
| * 判断是否为绑安全带图片
| */
| public boolean isSeatBelt() {
| return this == SEAT_BELT;
| }
| }
|
|