提交 cc295c9c authored 作者: chengye's avatar chengye

调整列表顺序

上级 a13f5570
...@@ -38,6 +38,8 @@ class EmInvoice extends Base ...@@ -38,6 +38,8 @@ class EmInvoice extends Base
->join(['station_info'=>'station'],'station.station_id=em.station_id') ->join(['station_info'=>'station'],'station.station_id=em.station_id')
->where($map) ->where($map)
->page($Nowpage, $limits) ->page($Nowpage, $limits)
->order('inv.id desc')
->select() ->select()
->toarray(); ->toarray();
foreach ($data as &$item){ foreach ($data as &$item){
......
...@@ -35,6 +35,7 @@ class EmPayment extends Base ...@@ -35,6 +35,7 @@ class EmPayment extends Base
->join(['station_info'=>'station'],'station.station_id=em.station_id') ->join(['station_info'=>'station'],'station.station_id=em.station_id')
->join(['region'=>'r'],'station.area_id = r.id') ->join(['region'=>'r'],'station.area_id = r.id')
->where($map) ->where($map)
->order('pay.id desc')
->page($Nowpage, $limits) ->page($Nowpage, $limits)
->select() ->select()
->toarray(); ->toarray();
......
...@@ -36,6 +36,7 @@ class EmSettle extends Base ...@@ -36,6 +36,7 @@ class EmSettle extends Base
->join(['station_info'=>'station'],'station.station_id=em.station_id') ->join(['station_info'=>'station'],'station.station_id=em.station_id')
->join(['region'=>'r'],'station.area_id = r.id') ->join(['region'=>'r'],'station.area_id = r.id')
->where($map) ->where($map)
->order('settle.id desc')
->page($Nowpage, $limits) ->page($Nowpage, $limits)
->select() ->select()
->toarray(); ->toarray();
......
...@@ -236,7 +236,7 @@ class Invoice extends Base ...@@ -236,7 +236,7 @@ class Invoice extends Base
$payment_amount = 0; $payment_amount = 0;
$settle_amount = 0; $settle_amount = 0;
foreach ($data as $v){ foreach ($data as $v){
$v->settle_amount = $v->settle_amount ?:0 $v->settle_amount = $v->settle_amount ?:0;
$payment_amount += $v->payment_amount; $payment_amount += $v->payment_amount;
$settle_amount += $v->settle_amount; $settle_amount += $v->settle_amount;
} }
......
...@@ -46,6 +46,7 @@ class Useage extends Base ...@@ -46,6 +46,7 @@ class Useage extends Base
->leftJoin(['station_info'=>'station'],'station.station_id=em.station_id') ->leftJoin(['station_info'=>'station'],'station.station_id=em.station_id')
->where($map) ->where($map)
->page($Nowpage, $limits) ->page($Nowpage, $limits)
->order('ue.id desc')
->select() ->select()
->toarray(); ->toarray();
return $data; return $data;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论