作者 董瑞恩

interface

@@ -30,7 +30,9 @@ class AdminStatisticsController extends AdminBaseController{ @@ -30,7 +30,9 @@ class AdminStatisticsController extends AdminBaseController{
30 public function index(){ 30 public function index(){
31 $param=$this->request->param(); 31 $param=$this->request->param();
32 $where=array(); 32 $where=array();
33 - dump($param); 33 + if (!empty($param['hospital'])){
  34 + $where['hospital']
  35 + }
34 //医院总体时长统计 36 //医院总体时长统计
35 $data=Db::name('order') 37 $data=Db::name('order')
36 ->alias('a') 38 ->alias('a')
@@ -99,6 +101,14 @@ class AdminStatisticsController extends AdminBaseController{ @@ -99,6 +101,14 @@ class AdminStatisticsController extends AdminBaseController{
99 $this->assign('interval',json_encode($interval)); 101 $this->assign('interval',json_encode($interval));
100 102
101 $this->assign('hospital', isset($param['hospital']) ? $param['hospital'] : ''); 103 $this->assign('hospital', isset($param['hospital']) ? $param['hospital'] : '');
  104 +
  105 +
  106 + $SQL=Db::name('order')
  107 + ->alias('a')
  108 + ->field('b.hospital')
  109 + ->join('equipment b','a.eq_name=b.name')
  110 + ->getLastSql();
  111 + dump($SQL);
102 return $this->fetch(); 112 return $this->fetch();
103 } 113 }
104 114