李林
2023-10-07 658d4927d468c47208fd012d9128b09249c07eff
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package com.chinaztt.mes.quality.excel;
 
/**
 * @Author: cxf
 * @Date: 2021/2/1 15:33
 */
public enum TestReport {
    /**
     * 零件编号
     */
    PART_NO("partNo", "零件编号"),
    /**
     * 检测描述
     */
    TEMPLATE_DESC("templateDesc", "检测描述"),
    /**
     * 零件描述
     */
    PART_DESC("partDesc", "零件描述"),
    /**
     * 零件规格
     */
    PART_SPECS("partSpecs", "零件规格"),
    /**
     * 检测结论
     */
    TEST_RESULT("testResult", "检测结论"),
    /**
     * 检测时间
     */
    TEST_TIME("testTime", "检测时间"),
    /**
     * 检测人
     */
    TEST_USER("testUser", "检测人"),
    /**
     * 备注
     */
    REMARK("remark", "备注"),
    /**
     * 订/工单号
     */
    ORDER_NO("orderNo", "订/工单号"),
    /**
     * 检测次数
     */
    TEST_COUNT("testCount", "检测次数");
 
    private String type;
 
    private String desc;
 
    private TestReport(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }
 
    public static String getValue(String type) {
        TestReport[] carTypeEnums = values();
        for (TestReport carTypeEnum : carTypeEnums) {
            if (carTypeEnum.type().equals(type)) {
                return carTypeEnum.desc();
            }
        }
        return null;
    }
 
    public static String getType(String desc) {
        TestReport[] carTypeEnums = values();
        for (TestReport carTypeEnum : carTypeEnums) {
            if (carTypeEnum.desc().equals(desc)) {
                return carTypeEnum.type();
            }
        }
        return null;
    }
 
    private String type() {
        return this.type;
    }
 
    private String desc() {
        return this.desc;
    }
}