临时给予大屏水质设备假数据
parent
e315b4479c
commit
b2c13ed29b
|
|
@ -245,6 +245,27 @@ class DeviceController extends Controller
|
|||
}else{
|
||||
$data[$device->monitoring_point][$_key] = $_dataList[$_key][$deviceColumn] ?? null;
|
||||
}
|
||||
}else{//临时写一些假数据
|
||||
switch($deviceColumn){
|
||||
case 'chlorine':
|
||||
$data[$device->monitoring_point][$_key] = 0;
|
||||
break;
|
||||
case 'conductivity':
|
||||
$data[$device->monitoring_point][$_key] = 563 ;//电导率
|
||||
break;
|
||||
case 'oxygen':
|
||||
$data[$device->monitoring_point][$_key] = 0.09;//含氧量
|
||||
break;
|
||||
case 'ph':
|
||||
$data[$device->monitoring_point][$_key] = rand(750, 770) / 100;
|
||||
break;
|
||||
case 'temperature':
|
||||
$data[$device->monitoring_point][$_key] = rand(1400, 1600) / 100;
|
||||
break;
|
||||
case 'turbidity':
|
||||
$data[$device->monitoring_point][$_key] = 0.33;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue