潘志宝
2024-12-12 b095cfc785d4a280ffaae086503a6a0e4f1fa4c1
提交 | 用户 | 时间
149dd0 1 package com.iailab.netsdk.lib.enumeration;
H 2
3 public enum EM_VEHICLE_REG_DB_OPERATOR_ERRCODE {
4     EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_UNKNWON (0,"未知") ,            // 未知
5     EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_SUCCESS(1,"成功"),             // 成功
6     EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_DB_ERROR(2,"数据库操作失败"),            // 数据库操作失败
7     EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_NOT_EXIST(3,"车牌不存在"),           // 车牌库不存在
8     EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_EXCEED_MAX_NUM(4,"超出车牌库数量限制");    // 超出车牌库数量限制
9
10     EM_VEHICLE_REG_DB_OPERATOR_ERRCODE(int state, String desc) {
11         this.state = state;
12         this.desc = desc;
13     }
14
15     private int state;
16     private String desc;
17
18     public int getState() {
19         return state;
20     }
21
22     public String getDesc() {
23         return desc;
24     }
25
26     public EM_VEHICLE_REG_DB_OPERATOR_ERRCODE getTaskState(int state) {
27         for (EM_VEHICLE_REG_DB_OPERATOR_ERRCODE taskState : EM_VEHICLE_REG_DB_OPERATOR_ERRCODE.values()) {
28             if (taskState.state == state) {
29                 return taskState;
30             }
31         }
32         return EM_VEHICLE_REG_DB_OPERATOR_ERRCODE_UNKNWON;
33     }
34 }