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

order

... ... @@ -28,6 +28,10 @@ use think\Db;
class AdminStatisticsController extends AdminBaseController{
public function index(){
//医院总体时长统计
$hospital=Db::name('equipment')->field('hospital')->group('hospital')->select();
dump($hospital);
//周统计
$week=array();
for ($i = 0; $i <= 15; $i++){
... ... @@ -58,7 +62,6 @@ class AdminStatisticsController extends AdminBaseController{
$this->assign('monthData',json_encode($Month_statistics));
//时间段统计
$interval=array();
$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'";
$interval[0]=Db::query($sql);
... ...