Fix
parent
de53ecbb16
commit
ff775ec9d5
|
|
@ -56,74 +56,25 @@ class DeviceLogService
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($device->isTypeSoil()) {
|
// 如果多合一气象监测器包含土壤监控时,需过滤掉气象监控的数据
|
||||||
// 如果包含气象设备监测字段,则跳过
|
if ($device->isTypeSoil() && Arr::hasAny($item['data'], [
|
||||||
if (Arr::hasAny($item['data'], [
|
'current_rainfall',
|
||||||
'day_rainfall',
|
'day_rainfall',
|
||||||
'accumulate_rainfall',
|
'accumulate_rainfall',
|
||||||
'potassium_content',
|
'moment_rainfall',
|
||||||
'moment_rainfall',
|
'pm10_concentration',
|
||||||
'pm10_concentration',
|
'pm25_concentration',
|
||||||
'pm25_concentration',
|
'box_illumination',
|
||||||
'box_noise',
|
'box_pressure',
|
||||||
'box_carbon',
|
'box_carbon',
|
||||||
'box_humidity',
|
'box_temperature',
|
||||||
'box_pressure',
|
'box_humidity',
|
||||||
'box_temperature',
|
'box_noise',
|
||||||
'box_illumination',
|
'wind_degree',
|
||||||
'wind_power',
|
'wind_direction',
|
||||||
'wind_speed',
|
'wind_power',
|
||||||
'wind_degree',
|
'wind_speed',
|
||||||
'wind_direction',
|
])) {
|
||||||
])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} elseif ($device->isTypeMeteorological()) {
|
|
||||||
// 如果包含土壤设备监测字段,则跳过
|
|
||||||
if (Arr::hasAny($item['data'], [
|
|
||||||
'nitrogen_content',
|
|
||||||
'phosphorus_content',
|
|
||||||
'potassium_content',
|
|
||||||
'conductivity',
|
|
||||||
'soil_humidity',
|
|
||||||
'soil_temperature',
|
|
||||||
])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
$device->isTypeSoil() && Arr::hasAny($item['data'], [
|
|
||||||
|
|
||||||
])
|
|
||||||
) {
|
|
||||||
|
|
||||||
} elseif (
|
|
||||||
$device->isTypeMeteorological() &&
|
|
||||||
Arr::hasAny(
|
|
||||||
$item['data'],
|
|
||||||
[
|
|
||||||
'nitrogen_content',
|
|
||||||
'phosphorus_content',
|
|
||||||
'potassium_content',
|
|
||||||
'conductivity',
|
|
||||||
'soil_humidity',
|
|
||||||
'soil_temperature',
|
|
||||||
]
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$isSoilMonitoring = Arr::hasAny($item['data'], [
|
|
||||||
'soil_humidity',
|
|
||||||
'soil_temperature',
|
|
||||||
'nitrogen_content',
|
|
||||||
'potassium_content',
|
|
||||||
'phosphorus_content',
|
|
||||||
]);
|
|
||||||
|
|
||||||
if (($device->isTypeSoil() && ! $isSoilMonitoring) || (! $device->isTypeSoil() && $isSoilMonitoring)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue