作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

order

@@ -28,6 +28,10 @@ use think\Db; @@ -28,6 +28,10 @@ use think\Db;
28 class AdminStatisticsController extends AdminBaseController{ 28 class AdminStatisticsController extends AdminBaseController{
29 29
30 public function index(){ 30 public function index(){
  31 + $hospital=$this->request->param('hospital');
  32 + $where=array();
  33 +
  34 +
31 //医院总体时长统计 35 //医院总体时长统计
32 $data=Db::name('order') 36 $data=Db::name('order')
33 ->alias('a') 37 ->alias('a')
@@ -82,7 +86,7 @@ class AdminStatisticsController extends AdminBaseController{ @@ -82,7 +86,7 @@ class AdminStatisticsController extends AdminBaseController{
82 86
83 //时间段统计 87 //时间段统计
84 $interval=array(); 88 $interval=array();
85 - $sql="SELECT count(*) as num FROM sleep_order where FROM_UNIXTIME(start_time,'%H:%i:%S')>'00:00:00' AND FROM_UNIXTIME(start_time,'%H:%i:%S')<'07:00:00' OR FROM_UNIXTIME(start_time,'%H:%i:%S')>'21:00:00' AND FROM_UNIXTIME(start_time,'%H:%i:%S')<'24:00:00'"; 89 + $sql="SELECT count(*) as num FROM sleep_order where (FROM_UNIXTIME(start_time,'%H:%i:%S')>'00:00:00' AND FROM_UNIXTIME(start_time,'%H:%i:%S')<'07:00:00') OR (FROM_UNIXTIME(start_time,'%H:%i:%S')>'21:00:00' AND FROM_UNIXTIME(start_time,'%H:%i:%S')<'24:00:00')";
86 $interval[0]=Db::query($sql); 90 $interval[0]=Db::query($sql);
87 $sql="SELECT count(*) as num FROM sleep_order where FROM_UNIXTIME(start_time,'%H:%i:%S')>'07:00:00' AND FROM_UNIXTIME(start_time,'%H:%i:%S')<'12:00:00'"; 91 $sql="SELECT count(*) as num FROM sleep_order where FROM_UNIXTIME(start_time,'%H:%i:%S')>'07:00:00' AND FROM_UNIXTIME(start_time,'%H:%i:%S')<'12:00:00'";
88 $interval[1]=Db::query($sql); 92 $interval[1]=Db::query($sql);
@@ -13,18 +13,6 @@ @@ -13,18 +13,6 @@
13 <link href="__TMPL__/public/assets/simpleboot3/css/simplebootadmin.css" rel="stylesheet"> 13 <link href="__TMPL__/public/assets/simpleboot3/css/simplebootadmin.css" rel="stylesheet">
14 <link href="__STATIC__/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> 14 <link href="__STATIC__/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
15 </head> 15 </head>
16 - <style>  
17 - .well{  
18 - min-height: 20px;  
19 - padding: 19px;  
20 - /* margin-bottom: 20px; */  
21 - background-color: #ecf0f1;  
22 - border: 1px solid transparent;  
23 - border-radius: 0;  
24 - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);  
25 - box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);  
26 - }  
27 - </style>  
28 <body> 16 <body>
29 17
30 <div class="data_wrap" style="background: #efeff5; width: 1020px; padding: 10px; overflow: hidden;"> 18 <div class="data_wrap" style="background: #efeff5; width: 1020px; padding: 10px; overflow: hidden;">
@@ -47,13 +35,12 @@ @@ -47,13 +35,12 @@
47 <div id="main10" class="my_main3"></div> 35 <div id="main10" class="my_main3"></div>
48 </div> 36 </div>
49 </div> 37 </div>
50 - <form class="well form-inline" method="post" action="{:url('AdminEquipment/index')}"> 38 + <form class="well form-inline" method="post" action="{:url('AdminStatistics/index')}">
51 初始医院: 39 初始医院:
52 <select class="form-control" id="hospital" name="hospital" style="width: 140px;"> 40 <select class="form-control" id="hospital" name="hospital" style="width: 140px;">
53 - <option value='0'>全部</option> 41 + <option value=''>全部</option>
54 </select> &nbsp;&nbsp; 42 </select> &nbsp;&nbsp;
55 <input type="submit" class="btn btn-primary" value="搜索"/> 43 <input type="submit" class="btn btn-primary" value="搜索"/>
56 - <a class="btn btn-danger" href="{:url('AdminEquipment/index')}">清空</a>  
57 </form> 44 </form>
58 <div class="qk_wrap" style=" margin-bottom: 10px;"> 45 <div class="qk_wrap" style=" margin-bottom: 10px;">
59 <div> 46 <div>