功能
一次取货后,将货物分拨到多个目标点,完成分拨之后将托盘、料箱归还到指定点。支持中途“挂起”、“继续”子任务,没有可执行子任务时去指定的“等待点”等待。
下单
POST /setOrder
下单时需要指定取货点、一组放货点、归还空栈板/料箱点
字段名称 | 类型 | 说明 | 是否必填 |
---|---|---|---|
id | string | 需要唯一 | 是 |
fromLoc | string | 取货点 | 是 |
loadPostAction | json | 取货回调 | |
toLocList | json | 放货点列表 | 是 |
unloadPostActionList | json | 放货回调 | |
returnLoc | string | 归还点 | 是 |
returnPostAction | json | 归还回调 | |
externalId | string | 外部单号 | |
group | string | 组名 | |
label | string | 标签 | |
vehicle | string | 机器人名 | |
ordered | bool | 是否按顺序执行 | |
priority | int32 | 优先级 |
报文示例:
{
"id":"DistributionOrder1", // 单号
"fromLoc":"AP1", // 取货点,必填
"loadPostAction":{"configId":"TestLoad"}, // 取货回调
"toLocList":["AP100","AP101","AP102"], // 放货点列表,必填
"unloadPostActionList":[{"toLoc":"AP100", "postAction":{"configId":"TestUnload"}},{"toLoc":"AP102","postAction":{"configId":"TestUnload2"}}],]
"returnLoc":"AP1000", // 归还空料箱、托盘、栈板的地点,必填
"returnPostAction":{"configId":"TestReturn"},// 归还回调
"externalId":"EXID1",// 可不填
"group":"G1", // 组名,选填
"label":"L1", // 标签,选填
"vehicle":"V1", // 指定机器人,选填
"ordered":false // 是否按顺序执行,false表示不按顺序
}
2
3
4
5
6
7
8
9
10
11
12
13
14
自定义取货订单
对于需要自定义取货订单动作的任务,支持使用 fromOrder
字段代替 fromLoc
下单,fromOrder
字段的内容同 setOrder
接口的报文,包括订单 id
,blocks
,complete
字段,例如:
{
"id":"DistributionOrder1", // 单号
// 自定义取货任务:
"fromOrder":{"id":"FromOrder", "blocks":[], "complete":false},
"toLocList":["AP100","AP101","AP102"], // 放货点列表,必填
// ...
}
2
3
4
5
6
7
下单后可以使用 addBlocks
接口追加动作块,实现自定义取货操作。
标记目标点货满,不需要放货
POST /setFull
报文:
{
"loc":"AP102",
"full":true
}
2
3
4
指定分拨单:
{
"loc":"AP102",
"externalId":"T1",
"full":true
}
2
3
4
5
标记目标点缺货,需要放货
POST /setFull
报文:
{
"loc":"AP101",
"full":false
}
2
3
4
指定分拨单:
{
"loc":"AP101",
"externalId":"T1",
"full":true
}
2
3
4
5
终止分拨单
POST /terminate
只能终止整个分拨单。无法取消单个目标。
查询分拨单状态
GET /distributeOrderDetails/{id}
GET /distributeOrderDetailsByExternalId/
返回状态:
{
"createTime": 1660286280,
"error": "[]",
"externalId": "xxx",
"fromLoc": "AP16",
"group": "",
"id": "4f4465de-1a09-11ed-89c5-106fd9f80a4a",
"label": "",
"loadOrder": {
"blocks": [
{
"binTask": "Load",
"blockId": "456edbc0-6952-4433-860a-60938fe16b53_block",
"goodsId": "",
"location": "AP16",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "FINISHED"
}
],
"complete": true,
"createTime": 1660286280,
"error": "",
"executionTimeCost": 5,
"externalId": "",
"finishOdo": 3.688,
"group": "",
"id": "456edbc0-6952-4433-860a-60938fe16b53",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 3.587701,
"priority": 0,
"receiveTime": 1660286280,
"startOdo": 0.100299,
"state": "FINISHED",
"terminalTime": 1660286285,
"terminateTime": 1660286285,
"type": 0,
"vehicle": "sim_02"
},
"loadOrderId": "456edbc0-6952-4433-860a-60938fe16b53",
"ordered": true,
"priority": 0,
"returnLoc": "",
"returnOrder": null,
"state": "RUNNING",
"terminateTime": 0,
"toLocList": [
"AP27",
"AP28",
"WS-1-5"
],
"unloadOrderId": "WS-1-5:8cd7cc07-35e6-44d5-83eb-309babf86c33;AP27:0449ba55-a436-4818-b660-40bd79a28e74;AP28:f81278b5-3dcf-4ace-9ad8-a2f7f6e20d2a",
"unloadOrderMap": [
{
"toLoc": "WS-1-5",
"unloadOrderList": [
{
"blocks": [
{
"binTask": "Unload",
"blockId": "8cd7cc07-35e6-44d5-83eb-309babf86c33_block",
"goodsId": "",
"location": "WS-1-5",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "WAITING"
}
],
"complete": true,
"createTime": 1660286285,
"error": "",
"executionTimeCost": 0,
"externalId": "",
"finishOdo": 0,
"group": "",
"id": "8cd7cc07-35e6-44d5-83eb-309babf86c33",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 0,
"priority": 0,
"receiveTime": 1660286280,
"startOdo": 3.688,
"state": "RUNNING",
"terminalTime": 0,
"terminateTime": 0,
"type": 0,
"vehicle": "sim_02"
}
]
},
{
"toLoc": "AP27",
"unloadOrderList": [
{
"blocks": [
{
"binTask": "Unload",
"blockId": "0449ba55-a436-4818-b660-40bd79a28e74_block",
"goodsId": "",
"location": "AP27",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "CREATED"
}
],
"complete": true,
"createTime": 0,
"error": "",
"executionTimeCost": 0,
"externalId": "",
"finishOdo": 0,
"group": "",
"id": "0449ba55-a436-4818-b660-40bd79a28e74",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 0,
"priority": 0,
"receiveTime": 1660286280,
"startOdo": 0,
"state": "TOBEDISPATCHED",
"terminalTime": 0,
"terminateTime": 0,
"type": 0,
"vehicle": "sim_02"
}
]
},
{
"toLoc": "AP28",
"unloadOrderList": [
{
"blocks": [
{
"binTask": "Unload",
"blockId": "f81278b5-3dcf-4ace-9ad8-a2f7f6e20d2a_block",
"goodsId": "",
"location": "AP28",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "CREATED"
}
],
"complete": true,
"createTime": 0,
"error": "",
"executionTimeCost": 0,
"externalId": "",
"finishOdo": 0,
"group": "",
"id": "f81278b5-3dcf-4ace-9ad8-a2f7f6e20d2a",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 0,
"priority": 0,
"receiveTime": 1660286280,
"startOdo": 0,
"state": "TOBEDISPATCHED",
"terminalTime": 0,
"terminateTime": 0,
"type": 0,
"vehicle": "sim_02"
}
]
}
],
"vehicle": "sim_02",
"waitOrderList": [
null
]
}
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
分页查询
GET /distributeOrders
{
"list": [
{
"createTime": 1660286280,
"error": "[]",
"externalId": "xxx",
"fromLoc": "AP16",
"group": "",
"id": "4f4465de-1a09-11ed-89c5-106fd9f80a4a",
"label": "",
"loadOrder": {
"blocks": [
{
"binTask": "Load",
"blockId": "456edbc0-6952-4433-860a-60938fe16b53_block",
"goodsId": "",
"location": "AP16",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "FINISHED"
}
],
"complete": true,
"createTime": 1660286280,
"error": "",
"executionTimeCost": 5,
"externalId": "",
"finishOdo": 3.688,
"group": "",
"id": "456edbc0-6952-4433-860a-60938fe16b53",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 3.587701,
"priority": 0,
"receiveTime": 1660286280,
"startOdo": 0.100299,
"state": "FINISHED",
"terminalTime": 1660286285,
"terminateTime": 1660286285,
"type": 0,
"vehicle": "sim_02"
},
"loadOrderId": "456edbc0-6952-4433-860a-60938fe16b53",
"ordered": true,
"priority": 0,
"returnLoc": "",
"returnOrder": null,
"state": "RUNNING",
"terminateTime": 0,
"toLocList": [
"AP27",
"AP28",
"WS-1-5"
],
"unloadOrderId": "WS-1-5:8cd7cc07-35e6-44d5-83eb-309babf86c33;AP27:0449ba55-a436-4818-b660-40bd79a28e74;AP28:f81278b5-3dcf-4ace-9ad8-a2f7f6e20d2a",
"unloadOrderMap": [
{
"toLoc": "WS-1-5",
"unloadOrderList": [
{
"blocks": [
{
"binTask": "Unload",
"blockId": "8cd7cc07-35e6-44d5-83eb-309babf86c33_block",
"goodsId": "",
"location": "WS-1-5",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "RUNNING"
}
],
"complete": true,
"createTime": 1660286285,
"error": "",
"executionTimeCost": 0,
"externalId": "",
"finishOdo": 0,
"group": "",
"id": "8cd7cc07-35e6-44d5-83eb-309babf86c33",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 0,
"priority": 0,
"receiveTime": 1660286280,
"startOdo": 3.688,
"state": "RUNNING",
"terminalTime": 0,
"terminateTime": 0,
"type": 0,
"vehicle": "sim_02"
}
]
},
{
"toLoc": "AP27",
"unloadOrderList": [
{
"blocks": [
{
"binTask": "Unload",
"blockId": "0449ba55-a436-4818-b660-40bd79a28e74_block",
"goodsId": "",
"location": "AP27",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "CREATED"
}
],
"complete": true,
"createTime": 0,
"error": "",
"executionTimeCost": 0,
"externalId": "",
"finishOdo": 0,
"group": "",
"id": "0449ba55-a436-4818-b660-40bd79a28e74",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 0,
"priority": 0,
"receiveTime": 1660286280,
"startOdo": 0,
"state": "TOBEDISPATCHED",
"terminalTime": 0,
"terminateTime": 0,
"type": 0,
"vehicle": "sim_02"
}
]
},
{
"toLoc": "AP28",
"unloadOrderList": [
{
"blocks": [
{
"binTask": "Unload",
"blockId": "f81278b5-3dcf-4ace-9ad8-a2f7f6e20d2a_block",
"goodsId": "",
"location": "AP28",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "CREATED"
}
],
"complete": true,
"createTime": 0,
"error": "",
"executionTimeCost": 0,
"externalId": "",
"finishOdo": 0,
"group": "",
"id": "f81278b5-3dcf-4ace-9ad8-a2f7f6e20d2a",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 0,
"priority": 0,
"receiveTime": 1660286280,
"startOdo": 0,
"state": "TOBEDISPATCHED",
"terminalTime": 0,
"terminateTime": 0,
"type": 0,
"vehicle": "sim_02"
}
]
}
],
"vehicle": "sim_02",
"waitOrderList": [
null
]
},
{
"createTime": 0,
"error": "[]",
"externalId": "xxx",
"fromLoc": "AP16",
"group": "",
"id": "50794fd9-1a09-11ed-a7f0-106fd9f80a4a",
"label": "",
"loadOrder": {
"blocks": [
{
"binTask": "Load",
"blockId": "e9d3a4c8-4b45-462f-a65f-a6df4c6667a3_block",
"goodsId": "",
"location": "AP16",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "CREATED"
}
],
"complete": true,
"createTime": 0,
"error": "",
"executionTimeCost": 0,
"externalId": "",
"finishOdo": 0,
"group": "",
"id": "e9d3a4c8-4b45-462f-a65f-a6df4c6667a3",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 0,
"priority": 0,
"receiveTime": 1660286282,
"startOdo": 0,
"state": "TOBEDISPATCHED",
"terminalTime": 0,
"terminateTime": 0,
"type": 0,
"vehicle": ""
},
"loadOrderId": "e9d3a4c8-4b45-462f-a65f-a6df4c6667a3",
"ordered": true,
"priority": 0,
"returnLoc": "",
"returnOrder": null,
"state": "TOBEDISPATCHED",
"terminateTime": 0,
"toLocList": [
"AP27",
"AP28",
"WS-1-5"
],
"unloadOrderId": "AP27:7a228fb9-2726-4072-9a38-64f679a57108;WS-1-5:70093bf8-3f04-4ad3-a4e1-5e0d9e678f59;AP28:1f7772dd-0a91-4d40-a0c7-0cab9d636090",
"unloadOrderMap": [
{
"toLoc": "AP27",
"unloadOrderList": [
{
"blocks": [
{
"binTask": "Unload",
"blockId": "7a228fb9-2726-4072-9a38-64f679a57108_block",
"goodsId": "",
"location": "AP27",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "CREATED"
}
],
"complete": true,
"createTime": 0,
"error": "",
"executionTimeCost": 0,
"externalId": "",
"finishOdo": 0,
"group": "",
"id": "7a228fb9-2726-4072-9a38-64f679a57108",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 0,
"priority": 0,
"receiveTime": 1660286282,
"startOdo": 0,
"state": "TOBEDISPATCHED",
"terminalTime": 0,
"terminateTime": 0,
"type": 0,
"vehicle": ""
}
]
},
{
"toLoc": "WS-1-5",
"unloadOrderList": [
{
"blocks": [
{
"binTask": "Unload",
"blockId": "70093bf8-3f04-4ad3-a4e1-5e0d9e678f59_block",
"goodsId": "",
"location": "WS-1-5",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "CREATED"
}
],
"complete": true,
"createTime": 0,
"error": "",
"executionTimeCost": 0,
"externalId": "",
"finishOdo": 0,
"group": "",
"id": "70093bf8-3f04-4ad3-a4e1-5e0d9e678f59",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 0,
"priority": 0,
"receiveTime": 1660286282,
"startOdo": 0,
"state": "TOBEDISPATCHED",
"terminalTime": 0,
"terminateTime": 0,
"type": 0,
"vehicle": ""
}
]
},
{
"toLoc": "AP28",
"unloadOrderList": [
{
"blocks": [
{
"binTask": "Unload",
"blockId": "1f7772dd-0a91-4d40-a0c7-0cab9d636090_block",
"goodsId": "",
"location": "AP28",
"operation": "",
"operation_args": "null",
"script_args": "null",
"script_name": "",
"state": "CREATED"
}
],
"complete": true,
"createTime": 0,
"error": "",
"executionTimeCost": 0,
"externalId": "",
"finishOdo": 0,
"group": "",
"id": "1f7772dd-0a91-4d40-a0c7-0cab9d636090",
"joinable": false,
"label": "",
"msg": "",
"orderOdo": 0,
"priority": 0,
"receiveTime": 1660286282,
"startOdo": 0,
"state": "TOBEDISPATCHED",
"terminalTime": 0,
"terminateTime": 0,
"type": 0,
"vehicle": ""
}
]
}
],
"vehicle": "",
"waitOrderList": [
null
]
}
],
"page": 1,
"size": 20,
"total": 2
}
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
报告放货完成
POST /distributeTaskDone/
小车在当前的分拨目标已完成放货。通过PDA发起,Core收到指令即确认小车当前分拨子任务完成,开始执行后续的分拨任务。
配置取放货动作
在参数配置中配置 DistributionLoadTask``DistributionUnloadTask``DistributionReturnTask
,在 SMAP 的库位属性中配置对应的动作。如,要在卸货时执行 WaitDI
, DistributionUnloadTask
配置为unload
,在对应的库位中,需要增加动作 unload
,内容为 WaitDI
。下单时不发送。
下单时按库位指定放货动作:
"unloadBinTaskList":[
{"toLoc":"AP123", "binTask":"EAT"},
{"toLoc":"AP122", "binTask":"SLEEP"}]
2
3
如果下单时没有指定放货动作,用参数配置中的放货动作
设置等待点
回调
回调在下单时指定,json中对应的字段如下:
- 取货回调:
"loadPostAction":{"configId":"TestLoad"}
- 放货回调:
"unloadPostActionList":[
{"toLoc":"AP123", "postAction":{"configId":"TestUnload"}},
{"toLoc":"AP122", "postAction":{"configId":"TestUnload"}}]
2
3
- 归还空料车回调
"returnPostAction":{"configId":"TestReturn"}
完整的下单请求: