This commit is contained in:
chenbo 2024-02-21 16:18:41 +08:00
parent a65aecd7cf
commit 4c44312dc2
2 changed files with 11 additions and 7 deletions

View File

@ -19,7 +19,7 @@ use think\exception\ValidateException;
class DeviceController extends BaseApiController
{
public array $notNeedLogin = ['deviceAlarmCount', 'deviceCount'];
public array $notNeedLogin = ['deviceAlarmCount', 'deviceCount', 'deviceDesc'];
public $areaCode;
public $streetCode;
@ -92,4 +92,8 @@ class DeviceController extends BaseApiController
}
public function deviceDesc()
{
}
}

View File

@ -180,7 +180,7 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($ambientTemperatureDevice)) {
$rangeData = self::requestRangeMonitorData($ambientTemperatureDevice);
if (!empty($rangeData)) {
$ambientTemperatureDevice['RangeMonitorData'] = $rangeData[4];
$ambientTemperatureDevice['RangeMonitorData'] = $rangeData[0];
} else {
$ambientTemperatureDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
@ -193,7 +193,7 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($ambientHumidityDevice)) {
$rangeData = self::requestRangeMonitorData($ambientHumidityDevice);
if (!empty($rangeData)) {
$ambientHumidityDevice['RangeMonitorData'] = $rangeData[4];
$ambientHumidityDevice['RangeMonitorData'] = $rangeData[0];
} else {
$ambientHumidityDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
@ -205,7 +205,7 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($NDevice)) {
$rangeData = self::requestRangeMonitorData($NDevice);
if (!empty($rangeData)) {
$NDevice['RangeMonitorData'] = $rangeData[4];
$NDevice['RangeMonitorData'] = $rangeData[0];
} else {
$NDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
@ -217,7 +217,7 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($fireproofDevice)) {
$rangeData = self::requestRangeMonitorData($fireproofDevice);
if (!empty($rangeData)) {
$fireproofDevice['RangeMonitorData'] = $rangeData[4];
$fireproofDevice['RangeMonitorData'] = $rangeData[0];
} else {
$fireproofDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}
@ -230,7 +230,7 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($methaneDevice)) {
$rangeData = self::requestRangeMonitorData($methaneDevice);
if (!empty($rangeData)) {
$methaneDevice['RangeMonitorData'] = $rangeData[4];
$methaneDevice['RangeMonitorData'] = $rangeData[0];
} else {
$methaneDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];;
}
@ -243,7 +243,7 @@ class RemoteRequestLogic extends BaseLogic
if (!empty($noiseDevice)) {
$rangeData = self::requestRangeMonitorData($noiseDevice);
if (!empty($rangeData)) {
$noiseDevice['RangeMonitorData'] = $rangeData[4];
$noiseDevice['RangeMonitorData'] = $rangeData[0];
} else {
$noiseDevice['RangeMonitorData'] = [0,0,0,0,0,0,0];
}