add 第二页-地块气象环境监测

This commit is contained in:
chenbo 2023-12-16 09:35:47 +08:00
parent 5e1573731a
commit a24e238880
2 changed files with 20 additions and 4 deletions

View File

@ -50,13 +50,11 @@ class DeviceController extends BaseApiController
}
})
->whereWeek('ma.create_time')
->limit(30)
->fetchSql()
->select();
return $this->success('成功', compact('list'));
}
// 测设备数量统计
// 测设备数量统计
public function deviceCount()
{
$total = Device::alias('d')

View File

@ -14,7 +14,15 @@ use think\exception\ValidateException;
class LandController extends BaseApiController
{
public array $notNeedLogin = ['plantProductCount', 'landCollectionList', 'landMonitorAlarmHistory', 'productList', 'landList', 'centralCount', 'areaPlantTypeCount'];
public array $notNeedLogin = ['plantProductCount',
'landCollectionList',
'landMonitorAlarmHistory',
'productList',
'landList',
'centralCount',
'areaPlantTypeCount',
'monitorInfo'
];
public $areaCode;
public $streetCode;
@ -197,4 +205,14 @@ class LandController extends BaseApiController
$plantKindList = $query->field('lp.land_id,lp.kind')->join('land_plant lp', 'l.id = lp.land_id')->group('lp.kind')->select();
return $this->success('成功', compact('totalArea', 'plantKindList'));
}
// 第二页 气象环境监测
public function monitorInfo()
{
$landId = $this->request->get('land_id');
// 气象信息
$landCollection = LandCollection::where('land_id', $landId)->order('id', 'desc')->find();
return $this->success('成功', compact('landCollection'));
}
}