update
This commit is contained in:
parent
91f0b26f07
commit
d1d70966d3
|
@ -151,13 +151,13 @@ class FarmController extends BaseApiController
|
|||
})->select()->toArray();
|
||||
|
||||
// 请求mqtt接口
|
||||
$list = RemoteRequestLogic::getAlarmData($deviceList);
|
||||
foreach($list as $k=>$v){
|
||||
$data = RemoteRequestLogic::getAlarmData($deviceList);
|
||||
foreach($data as $k=>$v){
|
||||
$time[$k] = strtotime($v['alarm_time']);
|
||||
}
|
||||
array_multisort($time, SORT_DESC, $list);
|
||||
$resultArray = array_slice($list, 0, 7);
|
||||
return $this->success('成功', compact('resultArray'));
|
||||
array_multisort($time, SORT_DESC, $data);
|
||||
$list = array_slice($data, 0, 7);
|
||||
return $this->success('成功', compact('list'));
|
||||
}
|
||||
|
||||
// 监测设备数量统计
|
||||
|
|
Loading…
Reference in New Issue