groupBy
This commit is contained in:
parent
0b6021e05e
commit
0694719c90
@ -43,7 +43,6 @@ class CompanyReportDetailExport extends AbstractExport implements FromQuery, Wit
|
||||
'sim',
|
||||
'company_id',
|
||||
'package_id',
|
||||
'order_id',
|
||||
'type',
|
||||
DB::raw('CASE "type" WHEN 3 THEN SUM(counts) ELSE count(*) END AS counts'),
|
||||
'unit_price'
|
||||
@ -51,7 +50,7 @@ class CompanyReportDetailExport extends AbstractExport implements FromQuery, Wit
|
||||
|
||||
$builder = $repository->forceNoReset()->select($select)
|
||||
->withConditions($this->conditions)
|
||||
->groupBy('sim')
|
||||
->groupBy('company_id', 'package_id', 'type', 'unit_price', 'sim')
|
||||
->orderBy('id', 'desc');
|
||||
|
||||
return $builder;
|
||||
|
@ -79,7 +79,6 @@ class CompanyReportService extends Service
|
||||
'sim',
|
||||
'company_id',
|
||||
'package_id',
|
||||
'order_id',
|
||||
'type',
|
||||
DB::raw('CASE "type" WHEN 3 THEN SUM(counts) ELSE count(*) END AS counts'),
|
||||
'unit_price'
|
||||
@ -87,7 +86,7 @@ class CompanyReportService extends Service
|
||||
|
||||
$query = $this->orderCardPartitionRepository->select($select)
|
||||
->withConditions($conditions)
|
||||
->groupBy('sim')
|
||||
->groupBy('company_id', 'package_id', 'type', 'unit_price', 'sim')
|
||||
->orderBy('id', 'desc');
|
||||
|
||||
$res = $query->paginate($conditions['limit']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user