This commit is contained in:
chenbo 2024-02-21 11:11:16 +08:00
parent a4e47643bb
commit 3643b2b7d7
1 changed files with 2 additions and 2 deletions

View File

@ -77,14 +77,14 @@ class DeviceController extends BaseApiController
$query->whereIn('d.id', $deviceIds);
}
});
$deviceList = $query->select()->toArray();
$total = $query->count();
$online = $query->where('d.is_online', 1)->count();
$offline = $query->where('d.is_online', 2)->count();
$deviceList = $query->select()->toArray();
// 请求mqtt
[$alarmCount,$todayAlarmCount] = RemoteRequestLogic::getAlarmCount($deviceList);