diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index c68a056..2cffbae 100755 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -548,7 +548,7 @@ class StatisticsController extends CommonController $area = Area::withCount('beds')->where('project_id', $project_id)->get(); foreach ($area as $item) { - $beds = Bed::where('area_id', $area->id)->where('project_id', $project_id)->get(); + $beds = Bed::where('area_id', $item->id)->where('project_id', $project_id)->get(); // 订单总数 $orderTotal = Orders::where('project_id', $project_id) ->where('created_at', 'like', '%' . $month . '%')