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

调整列表顺序

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