提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 任务运行状态 |
|
7 |
* @date 2021/2/22 |
|
8 |
*/ |
|
9 |
public enum EM_VIDEODIAGNOSIS_TASK_STATE { |
|
10 |
/** 未知 */ |
|
11 |
EM_VIDEODIAGNOSIS_TASK_STATE_UNKNOWN(-1, "未知"), |
|
12 |
/** 未开始 */ |
|
13 |
EM_VIDEODIAGNOSIS_TASK_STATE_NOT_STARTED(0, "未开始"), |
|
14 |
/** 运行中 */ |
|
15 |
EM_VIDEODIAGNOSIS_TASK_STATE_ONGOING(1, "运行中"), |
|
16 |
/** 未完成 */ |
|
17 |
EM_VIDEODIAGNOSIS_TASK_STATE_INCOMPLETE(2, "未完成"), |
|
18 |
/** 已完成 */ |
|
19 |
EM_VIDEODIAGNOSIS_TASK_STATE_COMPLETED(3, "已完成"); |
|
20 |
|
|
21 |
EM_VIDEODIAGNOSIS_TASK_STATE(int state, String desc) { |
|
22 |
this.state = state; |
|
23 |
this.desc = desc; |
|
24 |
} |
|
25 |
|
|
26 |
private int state; |
|
27 |
private String desc; |
|
28 |
|
|
29 |
public int getState() { |
|
30 |
return state; |
|
31 |
} |
|
32 |
|
|
33 |
public String getDesc() { |
|
34 |
return desc; |
|
35 |
} |
|
36 |
|
|
37 |
public EM_VIDEODIAGNOSIS_TASK_STATE getTaskState(int state) { |
|
38 |
for (EM_VIDEODIAGNOSIS_TASK_STATE taskState : EM_VIDEODIAGNOSIS_TASK_STATE.values()) { |
|
39 |
if (taskState.state == state) { |
|
40 |
return taskState; |
|
41 |
} |
|
42 |
} |
|
43 |
return EM_VIDEODIAGNOSIS_TASK_STATE_UNKNOWN; |
|
44 |
} |
|
45 |
} |