|
|
|
|
@ -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) {
|
|
|
|
|
|