wlzboy
2025-09-24 62a079a15b46925283581f6caaf631b5a4558927
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
package com.ruoyi.system.domain.enums;
 
/**
 * 任务车辆关联状态枚举
 * 
 * @author ruoyi
 */
public enum TaskVehicleStatus {
    
    /** 已分配 */
    ASSIGNED("ASSIGNED", "已分配"),
    
    /** 执行中 */
    ACTIVE("ACTIVE", "执行中"),
    
    /** 已完成 */
    COMPLETED("COMPLETED", "已完成"),
    
    /** 已取消 */
    CANCELLED("CANCELLED", "已取消");
    
    private final String code;
    private final String info;
    
    TaskVehicleStatus(String code, String info) {
        this.code = code;
        this.info = info;
    }
    
    public String getCode() {
        return code;
    }
    
    public String getInfo() {
        return info;
    }
    
    public static TaskVehicleStatus getByCode(String code) {
        for (TaskVehicleStatus status : values()) {
            if (status.getCode().equals(code)) {
                return status;
            }
        }
        return null;
    }
}