From 21ed461c3af5d52e1d51cd64e0517c43da653844 Mon Sep 17 00:00:00 2001 From: liyinglin Date: Tue, 19 Mar 2024 14:10:01 +0800 Subject: [PATCH] 1 --- app/Http/Controllers/Admin/StatisticsController.php | 3 ++- resources/views/admin/statistics/bed.blade.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index f834792..ec0ec8c 100755 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -467,9 +467,10 @@ class StatisticsController extends CommonController $item->bed_rate = round($item->beds_count / $totalBed, 4) * 100; } // 订单数 + $bedsIdTemp = Bed::where('area_id', $item->id)->where('project_id', $project_id)->pluck('id'); $item->order_total = Orders::where('project_id', $project_id) ->where('created_at', 'like', '%' . $month . '%') - ->whereIn('bed_id', $beds->pluck('id')) + ->whereIn('bed_id', $bedsIdTemp) ->count(); $item->rate = 0; if ($totalBed) { diff --git a/resources/views/admin/statistics/bed.blade.php b/resources/views/admin/statistics/bed.blade.php index 1e44cbf..a9acf72 100755 --- a/resources/views/admin/statistics/bed.blade.php +++ b/resources/views/admin/statistics/bed.blade.php @@ -29,7 +29,7 @@ 病区 - 床位数量(总数:{{$totalBed}}) + 床位数量(总数:{{$totalBed}}) 床位占比 订单数量 护工配比