fixed-2024-03-06-02
This commit is contained in:
parent
9994edcd5f
commit
91f0b26f07
|
@ -153,12 +153,11 @@ class FarmController extends BaseApiController
|
|||
// 请求mqtt接口
|
||||
$list = RemoteRequestLogic::getAlarmData($deviceList);
|
||||
foreach($list as $k=>$v){
|
||||
if(time() - strtotime($v['alarm_time']) > 604800){
|
||||
unset($list[$k]);
|
||||
}
|
||||
$time[$k] = strtotime($v['alarm_time']);
|
||||
}
|
||||
|
||||
return $this->success('成功', compact('list'));
|
||||
array_multisort($time, SORT_DESC, $list);
|
||||
$resultArray = array_slice($list, 0, 7);
|
||||
return $this->success('成功', compact('resultArray'));
|
||||
}
|
||||
|
||||
// 监测设备数量统计
|
||||
|
|
Loading…
Reference in New Issue