|
@@ -81,21 +81,21 @@ class ManDeviceJobLf implements ShouldQueue
|
|
|
list($status,$token) = ClearDataService::getTokenLf();
|
|
|
if(! $status) return;
|
|
|
|
|
|
- $url = $this->url . "api/module-data/device_machine_record/device_machine_record";
|
|
|
+ $url = $this->url . "/api/module-data/device_machine_record/device_machine_record/diy/create_single_data";
|
|
|
$post = [
|
|
|
'bizId' => -1,
|
|
|
'bizTypeEk' => 'LOWCODE',
|
|
|
'data' => [
|
|
|
'device_machine_record' => [
|
|
|
'machine_code' => $data['dev_eui'],
|
|
|
- 'param_value' => $data['value'],
|
|
|
+ 'param_value' => floatval($data['value']),
|
|
|
'record_time' => $this->getNowDay()
|
|
|
]
|
|
|
],
|
|
|
'dynamicFormId' => '477743923368955904',
|
|
|
'showModelId' => '477745421456904192'
|
|
|
];
|
|
|
- $header = ["Authorization: Bearer {$token}","Content-Type:application/json"];
|
|
|
+ $header = ["Authorization: Bearer {$token}","Content-Type:application/json","Site:LFMY"];
|
|
|
|
|
|
$curl = curl_init();
|
|
|
curl_setopt_array($curl, array(
|
|
@@ -123,7 +123,7 @@ class ManDeviceJobLf implements ShouldQueue
|
|
|
curl_close($curl);
|
|
|
|
|
|
$res = json_decode($response,true);
|
|
|
- if(isset($res['code'])){//报错了
|
|
|
+ if(! isset($res['status'])){//报错了
|
|
|
file_put_contents('record_man_lf_error.txt',date('Y-m-d H:i:s'). PHP_EOL . $response .PHP_EOL.json_encode($post),8);
|
|
|
}
|
|
|
}
|