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

order

... ... @@ -53,7 +53,7 @@ class AdminEquipmentController extends AdminBaseController{
$where['create_time']=['between',[strtotime($param['start_time']),strtotime($param['end_time'])]];
}
$Equipment=new EquipmentModel();
$data=$Equipment->where($where)->paginate(10,false,['query'=>$param]);
$data=$Equipment->where($where)->order('create_time','desc')->paginate(10,false,['query'=>$param]);
$this->assign('data',$data);
$this->assign('name', isset($param['name']) ? $param['name'] : '');
$this->assign('hospital', isset($param['hospital']) ? $param['hospital'] : '');
... ...
... ... @@ -47,6 +47,7 @@ class AdminOrderController extends AdminBaseController{
->field('a.*,b.serial_number,b.hospital')
->join('equipment b','a.mac_address=b.mac_address')
->where($where)
->order('start_time','desc')
->paginate(10)->each(function ($item){
$item['time']=($item['end_time']-$item['start_time'])/3600;
return $item;
... ...