服务统计
This commit is contained in:
parent
99fc80f682
commit
c2c8593a16
|
|
@ -86,6 +86,8 @@ class Item extends Backend
|
||||||
public function list()
|
public function list()
|
||||||
{
|
{
|
||||||
$build = new Order();
|
$build = new Order();
|
||||||
|
[$where, $sort, $order, $offset, $limit] = $this->buildparams();
|
||||||
|
|
||||||
|
|
||||||
$start = now()->modify('-7 days')->format('Y-m-d');
|
$start = now()->modify('-7 days')->format('Y-m-d');
|
||||||
$end_at = now()->format('Y-m-d 23:29:59');
|
$end_at = now()->format('Y-m-d 23:29:59');
|
||||||
|
|
@ -139,7 +141,7 @@ class Item extends Backend
|
||||||
])->group('item_title')
|
])->group('item_title')
|
||||||
->order('count_num', 'desc');
|
->order('count_num', 'desc');
|
||||||
// dd($total);
|
// dd($total);
|
||||||
$res = $build->paginate();
|
$res = $build->paginate($limit);
|
||||||
$total = $res->total();
|
$total = $res->total();
|
||||||
$ress = $res->items();
|
$ress = $res->items();
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
@ -156,7 +158,7 @@ class Item extends Backend
|
||||||
$re['total_avg'] = $this->mydiv($re['total'],$re['count_num'],2,false);
|
$re['total_avg'] = $this->mydiv($re['total'],$re['count_num'],2,false);
|
||||||
$re['performance_avg'] = $this->mydiv($re['performance'],$re['finish_num'],2,false);
|
$re['performance_avg'] = $this->mydiv($re['performance'],$re['finish_num'],2,false);
|
||||||
$re['avg_time_diff'] = $this->mydiv($re['avg_time_diff'],3600,2,false);
|
$re['avg_time_diff'] = $this->mydiv($re['avg_time_diff'],3600,2,false);
|
||||||
$re['cost_total'] = $cost_total;
|
$re['cost_total'] = number_format($cost_total,2,'.','');
|
||||||
// $re['id'] = $re['item_id'];
|
// $re['id'] = $re['item_id'];
|
||||||
$data [] = $re;
|
$data [] = $re;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user