Przeglądaj źródła

[智价云] 统计更新

tangyuanwang 1 dzień temu
rodzic
commit
ab25368aa4

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

@@ -1300,7 +1300,7 @@ class BasicPanel extends Controller
             $map[] = ['company_id', '=', $admin_company_id];
         }
         // 违规公司平台分布统计
-        $ViolationStoreModel = $ViolationStoreModel->where([['merge_province_name','!=','']]);
+        $ViolationStoreModel = $ViolationStoreModel->where([['province_name','!=','']]);
         if ($terminal_type) {
             $platform = [];
             switch ($terminal_type) {
@@ -1323,8 +1323,8 @@ class BasicPanel extends Controller
             // 假设 $violationProductModel 中有 province 字段,表示省份信息
             // 查询指定时间范围内的数据,并按 province 分组统计数量
             $result = $ViolationStoreModel->where($map)->where('status', 0)
-                ->select(['merge_province_name', DB::raw('count(merge_province_name) as count')])
-                ->groupby('merge_province_name')
+                ->select(['province_name', DB::raw('count(province_name) as count')])
+                ->groupby('province_name')
                 ->orderby('count', 'desc')
                 ->get();
             return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
@@ -1367,7 +1367,7 @@ class BasicPanel extends Controller
             $map[] = ['company_id', '=', $admin_company_id];
         }
         // 违规店铺省份统计
-        $ViolationStoreModel = $ViolationStoreModel->where([['merge_province_name','!=','']]);
+        $ViolationStoreModel = $ViolationStoreModel->where([['province_name','!=','']]);
         if ($terminal_type) {
             $platform = [];
             switch ($terminal_type) {
@@ -1390,8 +1390,8 @@ class BasicPanel extends Controller
             // 假设 $ViolationStoreModel 中有 province 字段,表示省份信息
             // 查询指定时间范围内的数据,并按 province 分组统计数量
             $result = $ViolationStoreModel->where($map)->where('status', 0)
-                ->select(['merge_province_name', DB::raw('count(merge_province_name) as count')])
-                ->groupby('merge_province_name')
+                ->select(['province_name', DB::raw('count(province_name) as count')])
+                ->groupby('province_name')
                 ->orderby('count', 'desc')
                 ->get()->toArray();
             $province_totle_count = 0;
@@ -1445,7 +1445,7 @@ class BasicPanel extends Controller
         }
 
         // 违规店铺省份统计
-        $ViolationStoreModel = $ViolationStoreModel->where([['merge_city_name','!=','']]);
+        $ViolationStoreModel = $ViolationStoreModel->where([['city_name','!=','']]);
         if ($terminal_type) {
             $platform = [];
             switch ($terminal_type) {
@@ -1468,9 +1468,9 @@ class BasicPanel extends Controller
             // 假设 $ViolationStoreModel 中有 province 字段,表示省份信息
             // 查询指定时间范围内的数据,并按 province 分组统计数量
             $result = $ViolationStoreModel->where($map)->where('status', 0)
-                ->select(['merge_city_name', DB::raw('count(merge_city_name) as count')])
+                ->select(['city_name', DB::raw('count(city_name) as count')])
                 ->distinct('company_name')
-                ->groupby('merge_city_name')
+                ->groupby('city_name')
                 ->orderby('count', 'desc')
                 ->get()->toArray();
             $province_totle_count = 0;