|
@@ -237,7 +237,7 @@ class Index extends Api
|
|
|
->leftJoin('system_towns b','a.towns_id=b.id')
|
|
|
->field('a.id,a.code,a.name,b.name as towns_name')
|
|
|
->with(['kd'=>function($query) use ($date){
|
|
|
- $query->where('date',$date)->group('site_id,name')->order('id asc')->field('id,site_id,name,sum(value) as value');
|
|
|
+ $query->group('site_id,name')->order('id asc')->field('id,site_id,name,sum(value) as value');
|
|
|
}])
|
|
|
->order('a.id asc')
|
|
|
->page($Nowpage,$limits)
|