文档
测试

获取异常锭子记录

POST
/wsc/mes/api/getAbnormals

接口描述

异常纱锭记录, 包含机台号,锭号,异常类型,开始时间,结束时间。 参数需要指定机台号,并指定要取哪个时间段 ( dtime_from - dtime_to ) 内 发生变化的记录。

请求头

参数名
类型
描述
必填
content-type
string
application/json
必填

请求参数

参数名
类型
描述
必填
machine_no
string
机台号
必填
dtime_from
string
开始时间点, 样例:2021-01-01 08:00:00
必填
dtime_to
string
截止时间点, 样例:2021-01-01 12:00:00
必填
apikey
string
调用者识别ID
必填
signature
string
调用者签名 sha1( apisecret + apikey + machine_no + dtime_from + dtime_to + apisecret), 然后 hexdigest, 转换为 十六进制数据字符串值 摘要
必填

响应参数

参数名
类型
描述
必填
code
int
请求状态码, 0 成功, 1 身份验证 或 签名验证失败 ...
必填
msg
string
消息, 例如: success, failed, authentication failed,
必填
count
int
返回记录条数
必填
records
array
返回的记录列表
必填
id
int
记录ID
必填
machine_no
string
机台号
必填
spindle_no
string
纱锭号
必填
type
string
异常类型, 1 断头, 2 弱捻, 3 空置, 4,故障, 5 旁路
必填
begin
string
异常发生时间
必填
end
string
异常结束时间
必填

说明 / 示例

######## 请求的 jsonrpc 格式如下:############## {"jsonrpc": "2.0", "method": "call", "params": {"apikey": "o9Gxc5G_3QwcQipKQ-IypL9HZJrw", "machine_no": "1", "dtime_from": "2021-02-04 08:00:00", "dtime_to": "2021-02-04 17:00:00", "signature": "5321bab23eedc3adc9dcec0705937155ada72deb"}, "id": 69462102} ####################### 应答格式如下: ###################### { "flag": true, "count": 2, "records": [         {             "record_id": "616852",             "machine_no": "12",             "spindle_no": "941",             "type": "1",             "begin": "2021-01-30 17:51:13",             "end": "2021-01-30 17:59:20"         },         {             "record_id": "616853",             "machine_no": "12",             "spindle_no": "410",             "type": "2",             "begin": "2021-01-30 16:59:03",             "end": "2021-01-30 17:31:26"         }     ],         }