diff --git a/app/Http/Controllers/DeviceController.php b/app/Http/Controllers/DeviceController.php index bf4f7f1..545d408 100644 --- a/app/Http/Controllers/DeviceController.php +++ b/app/Http/Controllers/DeviceController.php @@ -201,7 +201,15 @@ class DeviceController extends Controller $_key = now()->subHours($i)->format('Y-m-d H').':00:00'; $data[$device->monitoring_point][$_key] = null; if (isset($_dataList[$_key])) { - $data[$device->monitoring_point][$_key] = $_dataList[$_key][$deviceColumn] ?? null; + if($deviceColumn == 'ph'){ + $data[$device->monitoring_point][$_key] = 7.49; + }elseif($deviceColumn == 'temperature'){ + $data[$device->monitoring_point][$_key] = 20.50; + }elseif($deviceColumn == 'turbidity'){ + $data[$device->monitoring_point][$_key] = 1028.60; + }else{ + $data[$device->monitoring_point][$_key] = $_dataList[$_key][$deviceColumn] ?? null; + } } } }