郑永安
2023-09-19 69185134fcfaf913ea45f1255677225a2cc311a4
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
package com.gk.hotwork.Domain.Enum;
 
import com.fasterxml.jackson.annotation.JsonValue;
 
public enum CertificatePersonType {
 
    DRIVER("DRIVER", "驾驶员"),
    ESCORT("ESCORT", "押运员"),;
 
    private String code;
 
    private String msg;
 
    CertificatePersonType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
 
    public String getCode() {
        return code;
    }
    @JsonValue
    public String getMsg() {
        return msg;
    }
 
 
 
    public static CertificatePersonType parse(String code){
        for(CertificatePersonType cs:CertificatePersonType.values()){
            if(cs.getCode().equals(code)){
                return cs;
            }
        }
        return null;
    }
 
 
}