...
|
...
|
@@ -37,13 +37,11 @@ class Screen extends Api |
|
|
$list['team_rank'] = \db('team_score')
|
|
|
->where('ronda_id',$data['ronda_id'])
|
|
|
->order('score DESC')
|
|
|
->paginate(4);
|
|
|
// ->each(function ($item,$key){
|
|
|
// $res = db('study_score_log')->whereIn('campus_ids',$item['campus_ids'])->sum('score');
|
|
|
// $item['team_name'] = db('team')->where('title',$item['team'])->value('title');
|
|
|
// $item['team_score'] = db('team')->where('title',$item['team'])->value('score');
|
|
|
->paginate(4)
|
|
|
->each(function ($item,$key){
|
|
|
$item['team_name'] = db('team')->where('id',$item['team_id'])->value('title');
|
|
|
$item['team_score'] = $item['score'];
|
|
|
// $item['score'] = floor($item['sum_score']);
|
|
|
// $item['percent'] = round(($item['score']*0.6) / $res * 100,2);
|
|
|
// $item['study'] = db('study_score_log l')
|
|
|
// ->distinct('l.study_id')
|
|
|
// ->join('study s','l.study_id = s.id')
|
...
|
...
|
@@ -53,8 +51,8 @@ class Screen extends Api |
|
|
// ->order('sum_score','desc')
|
|
|
// ->group('study_id')
|
|
|
// ->select();
|
|
|
// return $item;
|
|
|
// });
|
|
|
return $item;
|
|
|
});
|
|
|
$this->success('获取成功',$list);
|
|
|
}
|
|
|
|
...
|
...
|
|