作者 董瑞恩
1 个管道 的构建 通过 耗费 1 秒

interface

@@ -35,7 +35,7 @@ class AdminAllStatisticsController extends AdminBaseController{ @@ -35,7 +35,7 @@ class AdminAllStatisticsController extends AdminBaseController{
35 ->field('a.*,count(a.eq_name) as num,sum(a.time) as sumTime') 35 ->field('a.*,count(a.eq_name) as num,sum(a.time) as sumTime')
36 // ->join('equipment b','a.eq_name=b.name') 36 // ->join('equipment b','a.eq_name=b.name')
37 ->join('users c','a.users_id=c.id') 37 ->join('users c','a.users_id=c.id')
38 - ->group('a.eq_name') 38 + ->group('a.users_id')
39 ->order('start_time','desc') 39 ->order('start_time','desc')
40 ->paginate(10)->each(function ($item){ 40 ->paginate(10)->each(function ($item){
41 $item['average']=round($item['sumTime']/$item['num']); 41 $item['average']=round($item['sumTime']/$item['num']);