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

order

@@ -30,7 +30,7 @@ class AdminAllStatisticsController extends AdminBaseController{ @@ -30,7 +30,7 @@ class AdminAllStatisticsController extends AdminBaseController{
30 public function index(){ 30 public function index(){
31 $Order=new OrderModel(); 31 $Order=new OrderModel();
32 $data=$Order->alias('a') 32 $data=$Order->alias('a')
33 - ->field('a.*,b.serial_number,b.hospital,sum(a.time) as sumTime,sum(*) as num') 33 + ->field('a.*,b.serial_number,b.hospital,count(mac_address),sum(a.time) as sumTime,sum(*) as num')
34 ->join('equipment b','a.mac_address=b.mac_address') 34 ->join('equipment b','a.mac_address=b.mac_address')
35 ->group('mac_address') 35 ->group('mac_address')
36 ->order('start_time','desc') 36 ->order('start_time','desc')