huangxiaoqiang
16 小时以前 e483ac11616ffc9260d8f491fcc0d66f480b5443
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace WIDESEAWCS_DTO.AGV
{
    public class ESSModel
    {
    }
    public class TaskModel
    {
        //入库 "taskType": "putaway" , 出库 "taskType": "carry"
        public string taskType { get; set; }
 
        public string taskGroupCode { get; set; }
 
        public int groupPriority { get; set; }
 
        public List<TasksType> tasks { get; set; }
 
    }
    public class TasksType
    {
        public string taskCode { get; set; }
 
        public int taskPriority { get; set; }
 
        public TaskDescribeType taskDescribe { get; set; }
 
    }
    public class TaskDescribeType
    {
        public string containerCode { get; set; }
 
        public string containerType { get; set; }
 
        public string storageTag { get; set; }
 
        public string fromLocationCode { get; set; }
 
        public string toStationCode { get; set; }
 
        public string toLocationCode { get; set; }
 
        public int deadline { get; set; }
 
    }
 
    public class Response
    {
        public int Code { get; set; }
 
        public string? Msg { get; set; }
 
        public object? Data { get; set; }
    }
 
    public class StatusCallbackRequest
    {
        /// <summary>
        /// 一次回调唯一标识
        /// </summary>
        public string CallId { get; set; }
 
        /// <summary>
        /// 业务任务号
        /// 当eventType为robot_reach时不填,其他值时必填
        /// </summary>
        public string TaskCode { get; set; }
 
        /// <summary>
        /// 上报事件类型
        /// </summary>
        public EventType EventType { get; set; }
 
        /// <summary>
        /// 任务状态
        /// </summary>
        public TaskStatus Status { get; set; }
 
        /// <summary>
        /// 机器人编码
        /// </summary>
        public string RobotCode { get; set; }
 
        /// <summary>
        /// 容器编码
        /// </summary>
        public string ContainerCode { get; set; }
 
        /// <summary>
        /// 工作位编码
        /// </summary>
        public string LocationCode { get; set; }
 
        /// <summary>
        /// 工作站编码
        /// </summary>
        public string StationCode { get; set; }
 
        /// <summary>
        /// 描述信息,描述异常原因/挂起原因等
        /// </summary>
        public string Message { get; set; }
 
        /// <summary>
        /// 系统任务编码,用于任务挂起回调
        /// </summary>
        public string SysTaskCode { get; set; }
 
        /// <summary>
        /// 库位是否有容器,eventType为task且为盘点任务时才会返回该值
        /// </summary>
        public bool? IsLocationHasContainer { get; set; }
 
        /// <summary>
        /// 背签层叶,从0层开始,从下往上编号。64表示放在了货叉上
        /// 当eventType为task且为称重盘点任务或rfid盘点任务时才会返回该值
        /// </summary>
        public int? TrayLevel { get; set; }
 
        /// <summary>
        /// 重量,单位为g。当eventType为task且为称重盘点任务时才会返回该值
        /// </summary>
        public int? Weight { get; set; }
 
        /// <summary>
        /// RFID盘点信息。当eventType为task且为rfid盘点任务时才会返回该值
        /// </summary>
        public List<string> Rfids { get; set; }
 
        /// <summary>
        /// 机器人类型编码。当eventType为robot_reach时才会返回该值
        /// </summary>
        public string RobotTypeCode { get; set; }
 
        /// <summary>
        /// 托盘信息。当eventType为robot_reach时才会返回该值
        /// </summary>
        public List<TrayItem> Trays { get; set; }
    }
    public enum EventType
    {
        /// <summary>
        /// 任务状态变化
        /// status:success-完成,cancel-取消,suspend-挂起
        /// </summary>
        task,
 
        /// <summary>
        /// 任务分配
        /// </summary>
        task_allocated,
 
        /// <summary>
        /// 取箱状态
        /// </summary>
        tote_load,
 
        /// <summary>
        /// 放箱状态
        /// </summary>
        tote_unload,
 
        /// <summary>
        /// 机器人到达工作站
        /// </summary>
        robot_reach,
 
        /// <summary>
        /// 扫码完成
        /// </summary>
        tote_scan,
    }
 
    public enum TaskStatus
    {
        /// <summary>
        /// 成功
        /// </summary>
        success,
        /// <summary>
        /// 取消
        /// </summary>
        cancel,
        /// <summary>
        /// 挂起
        /// </summary>
        suspend,
    }
    public class TrayItem
    {
        /// <summary>
        /// 容器编码
        /// </summary>
        public string ContainerCode { get; set; }
 
        /// <summary>
        /// 背签层叶,从0层开始,从下往上编号。64表示容器放在了货叉上
        /// </summary>
        public int TrayLevel { get; set; }
 
        /// <summary>
        /// 位置编码,由机器人编码和背签层数组成,即机器人id#层数
        /// </summary>
        public string PositionCode { get; set; }
 
        /// <summary>
        /// 目标容器朝向,取值为枚举值A、B、C、D
        /// </summary>
        public ContainerFace? ContainerFace { get; set; }
    }
    public enum ContainerFace
    {
        /// <summary>
        /// 0度
        /// </summary>
        A = 0,
 
        /// <summary>
        /// 90度
        /// </summary>
        B = 90,
 
        /// <summary>
        /// 180度
        /// </summary>
        C = 180,
 
        /// <summary>
        /// 270度
        /// </summary>
        D = 270
    }
}