This commit is contained in:
chenbo 2024-02-20 15:28:52 +08:00
parent 6e38198c21
commit b3fb33352d
1 changed files with 12 additions and 12 deletions

View File

@ -180,10 +180,10 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($rangeData)) {
$ambientTemperatureDevice['RangeMonitorData'] = $rangeData[4];
} else {
$ambientTemperatureDevice['RangeMonitorData'] = [];
$ambientTemperatureDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
} else {
$ambientTemperatureDevice['RangeMonitorData'] = [];
$ambientTemperatureDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
// 空气湿度 ambient_humidity
@ -193,10 +193,10 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($rangeData)) {
$ambientHumidityDevice['RangeMonitorData'] = $rangeData[4];
} else {
$ambientHumidityDevice['RangeMonitorData'] = [];
$ambientHumidityDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
} else {
$ambientHumidityDevice['RangeMonitorData'] = [];
$ambientHumidityDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
// 氮气 nitrogen
$NDevice = Device::whereIn('id', $deviceIds)->where('monitor_item', 'nitrogen')->find();
@ -205,10 +205,10 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($rangeData)) {
$NDevice['RangeMonitorData'] = $rangeData[4];
} else {
$NDevice['RangeMonitorData'] = [];
$NDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
} else {
$NDevice['RangeMonitorData'] = [];
$NDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
// 防火 fireproof
$fireproofDevice = Device::whereIn('id', $deviceIds)->where('monitor_item', 'fireproof')->find();
@ -217,10 +217,10 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($rangeData)) {
$fireproofDevice['RangeMonitorData'] = $rangeData[4];
} else {
$fireproofDevice['RangeMonitorData'] = [];
$fireproofDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
} else {
$fireproofDevice['RangeMonitorData'] = [];
$fireproofDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
// 甲烷 methane
@ -230,10 +230,10 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($rangeData)) {
$methaneDevice['RangeMonitorData'] = $rangeData[4];
} else {
$methaneDevice['RangeMonitorData'] = [];
$methaneDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];;
}
} else {
$methaneDevice['RangeMonitorData'] = [];
$methaneDevice['RangeMonitorData'] =[0,0,0,0,0,0,0];
}
// 噪音 noise
@ -243,10 +243,10 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($rangeData)) {
$noiseDevice['RangeMonitorData'] = $rangeData[4];
} else {
$noiseDevice['RangeMonitorData'] = [];
$noiseDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
} else {
$noiseDevice['RangeMonitorData'] = [];
$noiseDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
array_push($datas, $ambientTemperatureDevice, $ambientHumidityDevice, $fireproofDevice, $methaneDevice, $noiseDevice, $NDevice);
return $datas;