写死水质假数据
parent
6782df0028
commit
aab0684600
|
|
@ -201,7 +201,15 @@ class DeviceController extends Controller
|
||||||
$_key = now()->subHours($i)->format('Y-m-d H').':00:00';
|
$_key = now()->subHours($i)->format('Y-m-d H').':00:00';
|
||||||
$data[$device->monitoring_point][$_key] = null;
|
$data[$device->monitoring_point][$_key] = null;
|
||||||
if (isset($_dataList[$_key])) {
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue