diff --git a/app/Http/Controllers/DeviceController.php b/app/Http/Controllers/DeviceController.php index 08ddbc0..633c910 100644 --- a/app/Http/Controllers/DeviceController.php +++ b/app/Http/Controllers/DeviceController.php @@ -219,7 +219,7 @@ class DeviceController extends Controller if (isset($_dataList[$_key])) { $data[$device->monitoring_point][$_key] = $_dataList[$_key][$deviceColumn] ?? null; }else{ - $data[$device->monitoring_point][$_key] = $data[$device->monitoring_point][now()->subHours($i+1)->format('Y-m-d H').':00:00']; + $data[$device->monitoring_point][$_key] = $data[$device->monitoring_point][now()->subHours($i+1)->format('Y-m-d H').':00:00'] ?? null; } } }