|
|
@@ -90,6 +90,7 @@ class BasicPanel extends Controller
|
|
|
->get()->count();
|
|
|
|
|
|
//获取终端类型B端、C端、OTO,配置品规数量
|
|
|
+ $productModel = new ProductModel();
|
|
|
$productModel_map = [];
|
|
|
if ($start_time) $productModel_map[] = ['insert_time', '>=', $start_time];
|
|
|
if ($end_time) $productModel_map[] = ['insert_time', '<=', $end_time];
|
|
|
@@ -100,12 +101,22 @@ class BasicPanel extends Controller
|
|
|
$query->orWhereRaw("FIND_IN_SET(?, platform)", [$platform]);
|
|
|
}
|
|
|
})->where('status', 0)->where($productModel_map)->groupby('product_name')->sum('product_specs_number');
|
|
|
+
|
|
|
+ $productModel = new ProductModel();
|
|
|
+ $productModel_map = [];
|
|
|
+ if ($start_time) $productModel_map[] = ['insert_time', '>=', $start_time];
|
|
|
+ if ($end_time) $productModel_map[] = ['insert_time', '<=', $end_time];
|
|
|
$collect_c_product_count = $productModel->where(function ($query) {
|
|
|
$platforms = ['0', '1', '2', '3', '4'];
|
|
|
foreach ($platforms as $platform) {
|
|
|
$query->orWhereRaw("FIND_IN_SET(?, platform)", [$platform]);
|
|
|
}
|
|
|
})->where('status', 0)->where($productModel_map)->groupby('product_name')->sum('product_specs_number');
|
|
|
+
|
|
|
+ $productModel = new ProductModel();
|
|
|
+ $productModel_map = [];
|
|
|
+ if ($start_time) $productModel_map[] = ['insert_time', '>=', $start_time];
|
|
|
+ if ($end_time) $productModel_map[] = ['insert_time', '<=', $end_time];
|
|
|
$collect_oto_product_count = $productModel->where(function ($query) {
|
|
|
$platforms = ['0'];
|
|
|
foreach ($platforms as $platform) {
|