提交 7860838b authored 作者: chengye's avatar chengye

账单添加抄表日期查询

上级 0ea05e92
...@@ -31,20 +31,19 @@ class EmInvoice extends Base ...@@ -31,20 +31,19 @@ class EmInvoice extends Base
//账单查询+search //账单查询+search
public function getInvoiceList($map,$Nowpage,$limits){ public function getInvoiceList($map,$Nowpage,$limits){
$data = self::alias('inv') $data = self::alias('inv')
->field('inv.*') ->field('inv.*')
->field('station.station_name,em.em_numb') ->field('station.station_name,em.em_numb')
->field('eu.last_sum_numb,eu.current_sum_numb') ->field('eu.last_sum_numb,eu.current_sum_numb,FROM_UNIXTIME(eu.current_date,"%Y-%m-%d %H:%i:%S") as now_date')
->field('FROM_UNIXTIME("eu.current_date") as now_date') ->join(['em_invoice_useage'=>'eiu'],'eiu.invoice_id = inv.invoice_id')
->join(['em_invoice_useage'=>'eiu'],'eiu.invoice_id = inv.invoice_id') ->join(['em_useage'=>'eu'],'eu.useage_id = eiu.useage_id')
->join(['em_useage'=>'eu'],'eu.useage_id = eiu.useage_id') ->join(['em_account'=>'ea'],'ea.account_id = inv.account_id')
->join(['em_account'=>'ea'],'ea.account_id = inv.account_id') ->join(['em'],'em.id=ea.em_id')
->join(['em'],'em.id=ea.em_id') ->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')
->order('inv.id desc') ->select()
->select() ->toarray();
->toarray();
foreach ($data as &$item){ foreach ($data as &$item){
if($item['payment_balance'] == 0){ if($item['payment_balance'] == 0){
$item['paid_amount'] = $item['payment_amount'] ; $item['paid_amount'] = $item['payment_amount'] ;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论