From 7aa72601a5e414e52539697915730507617c3ad7 Mon Sep 17 00:00:00 2001 From: denghy Date: Thu, 14 Feb 2019 09:41:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Domains/Stats/Services/CompanyCountService.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/Domains/Stats/Services/CompanyCountService.php b/app/Domains/Stats/Services/CompanyCountService.php index ce2e7e2c..31bd797e 100644 --- a/app/Domains/Stats/Services/CompanyCountService.php +++ b/app/Domains/Stats/Services/CompanyCountService.php @@ -56,12 +56,9 @@ class CompanyCountService extends Service $select = [$groupBy, DB::raw('count(distinct sim) as counts')]; - $total = $this->orderCardRepository->select($select)->withConditions([ - 'company_id' => $companies->pluck('id')->toArray() - ])->groupBy($groupBy)->get()->pluck('counts', 'company_id')->toArray(); + $total = $this->orderCardRepository->select($select)->groupBy($groupBy)->get()->pluck('counts', 'company_id')->toArray(); $conditions = array_only($conditions, ['starttime', 'endtime']); - $conditions['company_id'] = $companies->pluck('id')->toArray(); $counts = $this->orderCardRepository->select($select)->withConditions($conditions)->groupBy($groupBy) ->get()->pluck('counts', 'company_id')->toArray();