Fix
parent
e0e9850812
commit
91f7b524fe
|
|
@ -102,6 +102,9 @@ class DeviceLogSyncCommand extends Command
|
||||||
$data = $httpClient->getLatestSoilReport($device->sn);
|
$data = $httpClient->getLatestSoilReport($device->sn);
|
||||||
|
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
|
$device->update([
|
||||||
|
'status' => DeviceStatus::Offline,
|
||||||
|
]);
|
||||||
$this->warn('设备数据为空');
|
$this->warn('设备数据为空');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -122,6 +125,9 @@ class DeviceLogSyncCommand extends Command
|
||||||
$data = $httpClient->getLatestMeteorologicalReport($device->sn);
|
$data = $httpClient->getLatestMeteorologicalReport($device->sn);
|
||||||
|
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
|
$device->update([
|
||||||
|
'status' => DeviceStatus::Offline,
|
||||||
|
]);
|
||||||
$this->warn('设备数据为空');
|
$this->warn('设备数据为空');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -142,6 +148,9 @@ class DeviceLogSyncCommand extends Command
|
||||||
$data = $httpClient->getLatestLampReport($device->sn);
|
$data = $httpClient->getLatestLampReport($device->sn);
|
||||||
|
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
|
$device->update([
|
||||||
|
'status' => DeviceStatus::Offline,
|
||||||
|
]);
|
||||||
$this->warn('设备数据为空');
|
$this->warn('设备数据为空');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -167,6 +176,9 @@ class DeviceLogSyncCommand extends Command
|
||||||
$data = $httpClient->getWormPhotos($device->sn, $now->copy()->subHours(24), $now);
|
$data = $httpClient->getWormPhotos($device->sn, $now->copy()->subHours(24), $now);
|
||||||
|
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
|
$device->update([
|
||||||
|
'status' => DeviceStatus::Offline,
|
||||||
|
]);
|
||||||
$this->warn('设备数据为空');
|
$this->warn('设备数据为空');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue