一、说明
- 该接口为设备方提供及维护,供WMS系统调用;
- 料架亮灯行为,由第三方控制;
- WMS PLUS提供PTL电子标签接口规范,如硬件供应商按我们的接口规范开发对应接口,则程序可自动支持该厂商的硬件;
二、参数说明
1.请求方式
请求方式 |
POST |
接口名称 |
http://服务器IP或机器名或域名/WMS/API/SYS/LightsUp |
格式 |
JSON |
编码类型 |
UTF-8 |
2.header参数
Content-Type |
application/json |
3.请求参数
序号 |
字段 |
字段名 |
字段类型 |
长度 |
必填 |
说明 |
1 |
ref_id |
第三方系统标识 |
string |
10 |
是 |
自定义一个系统标识 |
2 |
task_id |
第三方任务单号 |
string |
100 |
是 |
任务唯一ID |
[点亮/熄灯明细]datas |
1 |
device_id |
控制器ID |
string |
30 |
|
“控制器ID”与“IP地址”任意栏位必须有值 |
2 |
ip |
IP地址 |
string |
80 |
|
“控制器ID”与“IP地址”任意栏位必须有值 |
3 |
port |
端口号 |
int |
|
|
|
4 |
label |
电子标签id |
string |
60 |
是 |
电子标签id |
5 |
lights_color |
灯色 |
int |
|
是 |
灯色,值含义:0-灭灯,1-红,2-绿,3-蓝 |
6 |
qty1 |
数显区1 |
int |
|
|
|
7 |
qty2 |
数显区2 |
int |
|
|
|
8 |
RelateToTower |
关联灯塔 |
bool |
|
|
|
3.返回参数
序号 |
字段 |
字段名 |
字段类型 |
说明 |
1 |
code |
执行状态 |
string |
0为成功,其他视为失败 |
2 |
message |
错误说明 |
string |
|
3 |
task_id |
第三方任务单号 |
string |
任务唯一ID |
[处理明细]datas |
1 |
device_id |
控制器ID |
string |
|
2 |
ip |
IP地址 |
string |
|
3 |
label |
电子标签ID |
string |
电子标签id |
4 |
code |
执行状态 |
string |
0为成功,其他视为失败 |
5 |
message |
错误说明 |
string |
|
三、请求JSON示例
{
"ref_id": "AI-WMS PLUS",
"task_id": "f046031f-6ac1-4ec1-aa34-f2b2629e1866",
"datas": [
{
"device_id": "CDC01",
"ip": "",
"port": "",
"label": "SMT01-03-01-01-01",
"lights_color": "2",
"qty1": null,
"qty2": null,
"RelateToTower": true
},
{
"device_id": "CDC01",
"ip": "",
"port": "",
"label": "SMT01-03-01-01-02",
"lights_color": "2",
"qty1": null,
"qty2": null,
"RelateToTower": true
},
{
"device_id": "CDC01",
"ip": "",
"port": "",
"label": "SMT01-03-01-01-03",
"lights_color": "2",
"qty1": null,
"qty2": null,
"RelateToTower": true
},
{
"device_id": "CDC01",
"ip": "",
"port": "",
"label": "SMT01-03-01-01-04",
"lights_color": "2",
"qty1": null,
"qty2": null,
"RelateToTower": true
},
{
"device_id": "CDC01",
"ip": "",
"port": "",
"label": "SMT01-03-01-01-05",
"lights_color": "2",
"qty1": null,
"qty2": null,
"RelateToTower": true
}
]
}
四、返回结果示例
{
"code": 0,
"message": "",
"task_id": "f046031f-6ac1-4ec1-aa34-f2b2629e1866",
"datas": [
{
"device_id": "CDC01",
"ip": "",
"port": "",
"label": "SMT01-03-01-01-01",
"code": 0,
"message": ""
},
{
"device_id": "CDC01",
"ip": "",
"port": "",
"label": "SMT01-03-01-01-02",
"code": 0,
"message": ""
},
{
"device_id": "CDC01",
"ip": "",
"port": "",
"label": "SMT01-03-01-01-03",
"code": 0,
"message": ""
},
{
"device_id": "CDC01",
"ip": "",
"port": "",
"label": "SMT01-03-01-01-04",
"code": 0,
"message": ""
},
{
"device_id": "CDC01",
"ip": "",
"port": "",
"label": "SMT01-03-01-01-05",
"code": 0,
"message": ""
}
]
}