Jay
2024-11-08 02722a3f9eca857ce7fffea352e9f7ee692a1b71
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
package com.iailab.netsdk.lib.enumeration;
 
public enum EM_VEHICLE_REG_DB_OPERATOR_ERRCODE {
    EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_UNKNWON (0,"未知") ,            // 未知
    EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_SUCCESS(1,"成功"),             // 成功
    EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_DB_ERROR(2,"数据库操作失败"),            // 数据库操作失败
    EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_NOT_EXIST(3,"车牌不存在"),           // 车牌库不存在
    EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_EXCEED_MAX_NUM(4,"超出车牌库数量限制");    // 超出车牌库数量限制
 
    EM_VEHICLE_REG_DB_OPERATOR_ERRCODE(int state, String desc) {
        this.state = state;
        this.desc = desc;
    }
 
    private int state;
    private String desc;
 
    public int getState() {
        return state;
    }
 
    public String getDesc() {
        return desc;
    }
 
    public EM_VEHICLE_REG_DB_OPERATOR_ERRCODE getTaskState(int state) {
        for (EM_VEHICLE_REG_DB_OPERATOR_ERRCODE taskState : EM_VEHICLE_REG_DB_OPERATOR_ERRCODE.values()) {
            if (taskState.state == state) {
                return taskState;
            }
        }
        return EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_UNKNWON;
    }
}