From c6544e071c0bfaf57a26505e0b24891535534c08 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Sat, 16 Dec 2023 11:09:44 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E7=AC=AC=E4=BA=8C=E9=A1=B5-=E5=9C=B0?= =?UTF-8?q?=E5=9D=97=E7=9B=91=E6=B5=8B=E8=AE=BE=E5=A4=87=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/dataview/LandController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/api/controller/dataview/LandController.php b/app/api/controller/dataview/LandController.php index deb10538..a211a94e 100644 --- a/app/api/controller/dataview/LandController.php +++ b/app/api/controller/dataview/LandController.php @@ -5,6 +5,7 @@ namespace app\api\controller\dataview; use app\api\controller\BaseApiController; use app\common\model\device\Device; use app\common\model\device\MonitorAlarm; +use app\common\model\device\MonitorThreshold; use app\common\model\land\Land; use app\common\model\land\LandPlant; use app\common\model\land\Product; @@ -214,8 +215,10 @@ class LandController extends BaseApiController $landId = $this->request->get('land_id'); // 气象信息 $landCollection = LandCollection::where('land_id', $landId)->order('id', 'desc')->find(); - - return $this->success('成功', compact('landCollection')); + $monitorThreshold = MonitorThreshold::select()->toArray()[0]; + $monitorThreshold['ambient_air_pressure_max'] = 120; + $monitorThreshold['ambient_air_pressure_min'] = 10; + return $this->success('成功', compact('landCollection', 'monitorThreshold')); } // 监测设备数量统计