采集数据时新增一个parent_code字段,同时device_code更改为必填
This commit is contained in:
@@ -175,6 +175,15 @@ $worker -> onMessage = function(TcpConnection $connection, Request $request) {
|
||||
'errmsg' => '节点编码和数值类型不匹配!'
|
||||
)));
|
||||
$connection -> send($response);
|
||||
} else if ($data_capture -> check_res === 'NO_DEVICE_CODE') {
|
||||
$response = new Response(200, [
|
||||
'Content-Type' => 'application/json;charset=utf-8',
|
||||
], json_encode(array(
|
||||
'action' => 'result_set_node_data',
|
||||
'errcode' => 4002,
|
||||
'errmsg' => 'device_code为必填字段!'
|
||||
)));
|
||||
$connection -> send($response);
|
||||
}
|
||||
$res = $data_capture -> set_node_data();
|
||||
if ($res === true) {
|
||||
|
||||
Reference in New Issue
Block a user