add 第二页-地块监测设备统计

This commit is contained in:
chenbo 2023-12-16 11:09:44 +08:00
parent c9b6cdb300
commit c6544e071c
1 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,7 @@ namespace app\api\controller\dataview;
use app\api\controller\BaseApiController; use app\api\controller\BaseApiController;
use app\common\model\device\Device; use app\common\model\device\Device;
use app\common\model\device\MonitorAlarm; use app\common\model\device\MonitorAlarm;
use app\common\model\device\MonitorThreshold;
use app\common\model\land\Land; use app\common\model\land\Land;
use app\common\model\land\LandPlant; use app\common\model\land\LandPlant;
use app\common\model\land\Product; use app\common\model\land\Product;
@ -214,8 +215,10 @@ class LandController extends BaseApiController
$landId = $this->request->get('land_id'); $landId = $this->request->get('land_id');
// 气象信息 // 气象信息
$landCollection = LandCollection::where('land_id', $landId)->order('id', 'desc')->find(); $landCollection = LandCollection::where('land_id', $landId)->order('id', 'desc')->find();
$monitorThreshold = MonitorThreshold::select()->toArray()[0];
return $this->success('成功', compact('landCollection')); $monitorThreshold['ambient_air_pressure_max'] = 120;
$monitorThreshold['ambient_air_pressure_min'] = 10;
return $this->success('成功', compact('landCollection', 'monitorThreshold'));
} }
// 监测设备数量统计 // 监测设备数量统计