|
|
|
|
@ -64,7 +64,9 @@ class HomeController extends CommonController
|
|
|
|
|
})->count();
|
|
|
|
|
|
|
|
|
|
// 各产品占比
|
|
|
|
|
$lies = [];
|
|
|
|
|
$product = Product::where('project_id', $project_id)->first();
|
|
|
|
|
if($product){
|
|
|
|
|
$productItem = ProductItems::where('product_id', $product->id)->get();
|
|
|
|
|
$factor = FactorItems::where('factor_id', $product->statistic_factor_id)->get();
|
|
|
|
|
$order_total = OrderItems::whereIn('product_item_id', $productItem->pluck('id'))->sum('total');
|
|
|
|
|
@ -72,6 +74,7 @@ class HomeController extends CommonController
|
|
|
|
|
$lies = Cache::remember('cache_lies', 24 * 60 * 60, function () use ($productItem, $factor, $order_total) {
|
|
|
|
|
return $this->getLies($productItem, $factor, $order_total);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$allMontn = [
|
|
|
|
|
date("Y") . '-01',
|
|
|
|
|
|