...
|
...
|
@@ -31,10 +31,14 @@ class AdminStatisticsController extends AdminBaseController{ |
|
|
$param=$this->request->param();
|
|
|
$where='';
|
|
|
$where1=[];
|
|
|
$where2=[];
|
|
|
if (!empty($param['hospital'])){
|
|
|
$where="hospital='".$param['hospital']."' AND";
|
|
|
$where1['hospital']=$param['hospital'];
|
|
|
}
|
|
|
if (!empty($param['note'])){
|
|
|
$where2['note']=$param['note'];
|
|
|
}
|
|
|
//医院总体时长统计
|
|
|
$data=Db::name('order')
|
|
|
->alias('a')
|
...
|
...
|
@@ -91,6 +95,14 @@ class AdminStatisticsController extends AdminBaseController{ |
|
|
->where('o.start_time','between',$month_interval[$i])
|
|
|
->where('o.state',3)
|
|
|
->sum('o.price');
|
|
|
$Month_note_money[]=Db::name('order')
|
|
|
->alias('o')
|
|
|
->join('equipment e','o.eq_name=e.name')
|
|
|
->where($where1)
|
|
|
->where($where2)
|
|
|
->where('o.start_time','between',$month_interval[$i])
|
|
|
->where('o.state',3)
|
|
|
->sum('o.price');
|
|
|
}
|
|
|
$this->assign('month',json_encode($Month));
|
|
|
$this->assign('monthData',json_encode($Month_statistics));
|
...
|
...
|
@@ -125,8 +137,12 @@ class AdminStatisticsController extends AdminBaseController{ |
|
|
|
|
|
public function getNote(){
|
|
|
$param=$this->request->param();
|
|
|
$data=Db::name('equipment')->where(['hospital'=>$param['hospital'],'is_delete'=>0])->whereNotNull('note')->group('note')->select()->toArray();
|
|
|
if ($param['hospital']!="") {
|
|
|
$data = Db::name('equipment')->where(['hospital' => $param['hospital'], 'is_delete' => 0])->whereNotNull('note')->group('note')->select()->toArray();
|
|
|
return $data;
|
|
|
}else{
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|