Commit de0391bc authored by clone's avatar clone

total_fee

parent 2cb68df7
......@@ -852,6 +852,7 @@ class Finance extends Basic
$m_fee = new OTaxes();
$data['data']['list'] = $m_fee->getTaxesList($pageNo, $pageSize, 'a.id desc', $fields, $where);
$data['data']['total'] = $m_fee->getTaxesListTotal($where);
$data['data']['total_fee'] = $m_fee->getTaxesListTotalFee($where);
return $this->response($data['code'], $data['msg'], $data['data']);
}
......
......@@ -208,6 +208,23 @@ class OTaxes extends BaseModel
* @return int|string
*/
public function getTaxesListTotal($params)
{
$data = $this->alias('a')
->join('o_bargain b', 'a.bargain_id = b.id', 'left')
->join('o_order c', 'b.order_id = c.id', 'left')
->join('g_houses d', 'c.house_id = d.id', 'left')
->join('a_agents e', 'b.agent_id = e.id', 'left')
->where($params)
->count();
return $data;
}
/**
* 税费承担明细表总和
*
* @param $params
* @return int|string
*/
public function getTaxesListTotalFee($params)
{
$data = $this->alias('a')
->join('o_bargain b', 'a.bargain_id = b.id', 'left')
......@@ -219,6 +236,7 @@ class OTaxes extends BaseModel
return $data;
}
/**
* 查询分佣或开票
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment