|
@@ -43,7 +43,7 @@ class OverviewPanel extends Controller
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
|
- ->select(['company_name', DB::raw('count(link_url) as count')])->orderby('count', 'desc')
|
|
|
|
|
|
|
+ ->select(['company_name', DB::raw('count(link_url) as count')])->distinct('link_url')->orderby('count', 'desc')
|
|
|
->groupby('company_name')->paginate($limit);
|
|
->groupby('company_name')->paginate($limit);
|
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
|
}
|
|
}
|
|
@@ -64,7 +64,7 @@ class OverviewPanel extends Controller
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
|
- ->select(['company_name', DB::raw('count(link_url) as count')])->orderby('count', 'desc')
|
|
|
|
|
|
|
+ ->select(['company_name', DB::raw('count(link_url) as count')])->distinct('link_url')->orderby('count', 'desc')
|
|
|
->groupby('company_name')->get()->toarray();
|
|
->groupby('company_name')->get()->toarray();
|
|
|
//执行下载
|
|
//执行下载
|
|
|
$oss_url = $this->Violation_export_download($result);
|
|
$oss_url = $this->Violation_export_download($result);
|
|
@@ -142,7 +142,7 @@ class OverviewPanel extends Controller
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
|
- ->select(['company_name', DB::raw('count(company_name) as count')])->orderby('count', 'desc')
|
|
|
|
|
|
|
+ ->select(['company_name', DB::raw('count(company_name) as count')])->distinct('company_name')->orderby('count', 'desc')
|
|
|
->groupby('company_name')->paginate($limit);
|
|
->groupby('company_name')->paginate($limit);
|
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
|
}
|
|
}
|
|
@@ -163,7 +163,7 @@ class OverviewPanel extends Controller
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
|
- ->select(['company_name', DB::raw('count(company_name) as count')])->orderby('count', 'desc')
|
|
|
|
|
|
|
+ ->select(['company_name', DB::raw('count(company_name) as count')])->distinct('company_name')->orderby('count', 'desc')
|
|
|
->groupby('company_name')->get()->toarray();
|
|
->groupby('company_name')->get()->toarray();
|
|
|
//执行下载
|
|
//执行下载
|
|
|
$oss_url = $this->ViolationCompany_export_download($result);
|
|
$oss_url = $this->ViolationCompany_export_download($result);
|
|
@@ -242,7 +242,7 @@ class OverviewPanel extends Controller
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
|
- ->select(['company_name', DB::raw('count(link_url) as count')])->orderby('count', 'desc')
|
|
|
|
|
|
|
+ ->select(['company_name', DB::raw('count(link_url) as count')])->distinct('link_url')->orderby('count', 'desc')
|
|
|
->groupby('company_name')->paginate($limit);
|
|
->groupby('company_name')->paginate($limit);
|
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
|
}
|
|
}
|
|
@@ -263,7 +263,7 @@ class OverviewPanel extends Controller
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
|
- ->select(['company_name', DB::raw('count(link_url) as count')])->orderby('count', 'desc')
|
|
|
|
|
|
|
+ ->select(['company_name', DB::raw('count(link_url) as count')])->distinct('link_url')->orderby('count', 'desc')
|
|
|
->groupby('company_name')->get()->toarray();
|
|
->groupby('company_name')->get()->toarray();
|
|
|
//执行下载
|
|
//执行下载
|
|
|
$oss_url = $this->LowPrice_export_download($result);
|
|
$oss_url = $this->LowPrice_export_download($result);
|
|
@@ -341,7 +341,7 @@ class OverviewPanel extends Controller
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
|
- ->select(['company_name', DB::raw('count(company_name) as count')])->orderby('count', 'desc')
|
|
|
|
|
|
|
+ ->select(['company_name', DB::raw('count(company_name) as count')])->distinct('company_name')->orderby('count', 'desc')
|
|
|
->groupby('company_name')->paginate($limit);
|
|
->groupby('company_name')->paginate($limit);
|
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
|
}
|
|
}
|
|
@@ -362,7 +362,7 @@ class OverviewPanel extends Controller
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
|
- ->select(['company_name', DB::raw('count(company_name) as count')])->orderby('count', 'desc')
|
|
|
|
|
|
|
+ ->select(['company_name', DB::raw('count(company_name) as count')])->distinct('company_name')->orderby('count', 'desc')
|
|
|
->groupby('company_name')->get()->toarray();
|
|
->groupby('company_name')->get()->toarray();
|
|
|
//执行下载
|
|
//执行下载
|
|
|
$oss_url = $this->LowPriceCompany_export_download($result);
|
|
$oss_url = $this->LowPriceCompany_export_download($result);
|