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