diff --git a/app/api/controller/dataview/DeviceController.php b/app/api/controller/dataview/DeviceController.php index cc034e4..38ad84a 100644 --- a/app/api/controller/dataview/DeviceController.php +++ b/app/api/controller/dataview/DeviceController.php @@ -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() + { + + } } \ No newline at end of file diff --git a/app/common/logic/RemoteRequestLogic.php b/app/common/logic/RemoteRequestLogic.php index bd51741..1db5fa6 100644 --- a/app/common/logic/RemoteRequestLogic.php +++ b/app/common/logic/RemoteRequestLogic.php @@ -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]; }