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();