TaskPackage.java
3.71 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
package com.huaheng.control.management.dto;
import java.util.Map;
import javax.validation.constraints.NotNull;
import com.huaheng.control.management.dto.enums.EquipmentStatusEnum;
import com.huaheng.control.management.dto.enums.TaskStatusEnum;
import com.huaheng.control.management.dto.enums.TaskTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
@Schema(description = "任务信息对象(已封装)")
public class TaskPackage {
@Schema(description = "任务ID")
@NotNull()
private String taskId;
@Schema(description = "任务状态")
@NotNull()
private String taskStatus;
@Schema(description = "任务状态描述")
@NotNull()
private String taskStatusDescription;
@Schema(description = "任务持续时间(秒)")
private Long taskDurationSeconds;
@Schema(description = "任务持续时间(格式化)")
private String taskDurationSecondsFormat;
@Schema(description = "任务状态时间戳")
private Map<String, String> taskStatusTimestamps;
@Schema(description = "异常信息")
private String exceptionMessage;
@Schema(description = "异常处理方案")
private String exceptionHandlePlan;
/** WMS start */
@Schema(description = "任务类型")
private String taskType;
@Schema(description = "任务类型描述")
private String taskTypeDescription;
@Schema(description = "任务优先级")
private String taskPriority;
@Schema(description = "巷道")
private String roadway;
@Schema(description = "单据编码")
private String orderCode;
@Schema(description = "任务起始位置")
private String fromLocation;
@Schema(description = "任务目标位置")
private String toLocation;
@Schema(description = "托盘编码")
private String containerCode;
/** WCS start */
@Schema(description = "任务执行顺序")
private String taskExecutionOrder;
@Schema(description = "托盘当前位置")
private String containerCurrentLocation;
@Schema(description = "执行设备ID")
private String executionEquipmentId;
@Schema(description = "设备状态")
private String equipmentStatus;
@Schema(description = "设备状态描述")
private String equipmentStatusDescription;
@Schema(description = "设备运行模式")
private String equipmentOperationMode;
@Schema(description = "设备当前位置")
private String equipmentCurrentPosition;
@Schema(description = "更新时间")
private String updateTime;
@Schema(description = "更新人")
private String updateBy;
public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
TaskStatusEnum taskStatusEnum = TaskStatusEnum.fromKey(taskStatus);
if (taskStatusEnum != null) {
this.taskStatusDescription = taskStatusEnum.getDescription();
} else {
this.taskStatusDescription = taskStatus;
}
}
public void setEquipmentStatus(String equipmentStatus) {
this.equipmentStatus = equipmentStatus;
EquipmentStatusEnum equipmentStatusEnum = EquipmentStatusEnum.fromKey(equipmentStatus);
if (equipmentStatusEnum != null) {
this.equipmentStatusDescription = equipmentStatusEnum.getDescription();
} else {
this.equipmentStatusDescription = equipmentStatus;
}
}
public void setTaskType(String taskType) {
this.taskType = taskType;
TaskTypeEnum taskTypeEnum = TaskTypeEnum.fromKey(taskType);
if (taskTypeEnum != null) {
this.taskTypeDescription = taskTypeEnum.getDescription();
} else {
this.taskTypeDescription = taskType;
}
}
}