...
|
...
|
@@ -19,17 +19,21 @@ class StatisticsController extends AdminBaseController |
|
|
public function index(){
|
|
|
$where1=[];
|
|
|
$where2=[];
|
|
|
$where3=[];
|
|
|
$param = $this->request->param();
|
|
|
$startTime = empty($param['start_time']) ? 0 : strtotime($param['start_time']);
|
|
|
$endTime = empty($param['end_time']) ? 0 : strtotime($param['end_time']);
|
|
|
if (!empty($startTime) && !empty($endTime)) {
|
|
|
$where1['get_time'] = [['>= time', $startTime], ['<= time', $endTime]];
|
|
|
$where3['create_time'] = [['>= time', $startTime], ['<= time', $endTime]];
|
|
|
} else {
|
|
|
if (!empty($startTime)) {
|
|
|
$where1['get_time'] = ['>= time', $startTime];
|
|
|
$where3['create_time'] = ['>= time', $startTime];
|
|
|
}
|
|
|
if (!empty($endTime)) {
|
|
|
$where1['get_time'] = ['<= time', $endTime];
|
|
|
$where3['create_time'] = ['<= time', $endTime];
|
|
|
}
|
|
|
}
|
|
|
$logistics_id = empty($param['logistics_id']) ? '' : $param['logistics_id'];
|
...
|
...
|
@@ -148,7 +152,7 @@ class StatisticsController extends AdminBaseController |
|
|
$receiver_today[$key][] = round($receiver_today_total_price,2);
|
|
|
}
|
|
|
//总体数据统计
|
|
|
$today_visit = Db::name('visit')->where($where1)->count();
|
|
|
$today_visit = Db::name('visit')->where($where3)->count();
|
|
|
$today_place = Db::name('order')->where($where1)->where($where2)->where('is_del',0)->count();
|
|
|
$today_cancel = Db::name('order')->where($where1)->where($where2)->where('status',-1)->where('is_del',0)->count();
|
|
|
$today_get = Db::name('order')->where($where1)->where($where2)->where("status != 1 and status != -1")->where('is_del',0)->count();
|
...
|
...
|
|