...
|
...
|
@@ -41,20 +41,21 @@ class AdminStatisticsController extends AdminBaseController{ |
|
|
$hospital[$k]=$v['hospital'];
|
|
|
$num[$k]=$v['num'];
|
|
|
}
|
|
|
|
|
|
$this->assign('hospital',json_encode($hospital));
|
|
|
$this->assign('num',json_encode($num));
|
|
|
|
|
|
//周统计
|
|
|
$week=array();
|
|
|
for ($i = 0; $i <= 30; $i++){
|
|
|
$week[30-$i]=strtotime(date('Ymd',strtotime("-$i week")));
|
|
|
for ($i = 0; $i <= 15; $i++){
|
|
|
$week[15-$i]=strtotime(date('Ymd',strtotime("-$i week")));
|
|
|
}
|
|
|
$Week=array();
|
|
|
for ($i = 0; $i<30; $i++){
|
|
|
for ($i = 0; $i<15; $i++){
|
|
|
$Week[$i]=[$week[$i],$week[$i+1]];
|
|
|
}
|
|
|
$Week_statistics=array();
|
|
|
for ($i = 0; $i<30; $i++){
|
|
|
for ($i = 0; $i<15; $i++){
|
|
|
$Week_statistics[]=Db::name('order')->where('start_time','between',$Week[$i])->count();
|
|
|
}
|
|
|
$this->assign('weekData',json_encode($Week_statistics));
|
...
|
...
|
|