Browse Source

[智价云] 统计更新

public 13 hours ago
parent
commit
1966c48be7
1 changed files with 9 additions and 4 deletions
  1. 9 4
      app/Http/Controllers/Manager/Statistics/BasicPanel.php

+ 9 - 4
app/Http/Controllers/Manager/Statistics/BasicPanel.php

@@ -112,17 +112,18 @@ class BasicPanel extends Controller
             ->where($productModel_map)
             ->whereOr($productModel_other_map)
             ->distinct('product_name')
-            ->pluck('product_name');
+            ->pluck('product_name')->toarray();
 
+        $productModel = new ProductModel();
         $collect_b_product_count = $productModel
             ->whereIn('product_name', $productNames)
             ->where('status', 0)
             ->where($productModel_map)
+            ->whereOr($productModel_other_map)
             ->sum('product_specs_number');
 
 
 
-
         $productModel = new ProductModel();
         $productModel_map = [];
         $productModel_other_map = [];
@@ -151,12 +152,14 @@ class BasicPanel extends Controller
             ->where($productModel_map)
             ->whereOr($productModel_other_map)
             ->distinct('product_name')
-            ->pluck('product_name');
+            ->pluck('product_name')->toarray();
 
+        $productModel = new ProductModel();
         $collect_c_product_count = $productModel
             ->whereIn('product_name', $productNames)
             ->where('status', 0)
             ->where($productModel_map)
+            ->whereOr($productModel_other_map)
             ->sum('product_specs_number');
 
 
@@ -190,12 +193,14 @@ class BasicPanel extends Controller
             ->where($productModel_map)
             ->whereOr($productModel_other_map)
             ->distinct('product_name')
-            ->pluck('product_name');
+            ->pluck('product_name')->toarray();
 
+        $productModel = new ProductModel();
         $collect_oto_product_count = $productModel
             ->whereIn('product_name', $productNames)
             ->where('status', 0)
             ->where($productModel_map)
+            ->whereOr($productModel_other_map)
             ->sum('product_specs_number');