Commit a73bb7d2 authored by zhuwei's avatar zhuwei

1

parent 65af4d2f
......@@ -758,7 +758,8 @@ class OfficePerformanceService
$params = $this->getAgentIdPcInfo($id, $type, $start_time, $end_time);
if (!$params)
return [ "code" => 101, "date" => "传入的参数错误" ];
$field = "a.id,a.create_time,a.money,a.type,a.pay_type,c.user_name,c.user_phone,c.predict_see_time,b.id as order_id,b.house_title,h.internal_address";
$field = "a.id,a.create_time,a.money,a.type,a.pay_type,c.user_name,c.user_phone,c.predict_see_time,
b.id as order_id,s.title as house_title,s.address as internal_address";
$payLogList = $this->payLogModel->getAddPayLogListPcInfo($params, $field, $page_no, $page_size);
//获取图片信息
foreach ($payLogList as $key => $val) {
......
This diff is collapsed.
......@@ -148,7 +148,7 @@ class OfficeOPayLogModel extends Model
return Db::table($this->table)
->field($field)
->alias("a")
->join("o_order b", "a.order_id = b.id", "left")
->join("office_o_order b", "a.order_id = b.id", "left")
->join("a_agents c", "a.agent_id = c.id", "left")
->join("a_store d", "c.store_id = d.id", "left")
->where($where_)
......@@ -229,7 +229,7 @@ class OfficeOPayLogModel extends Model
return Db::table($this->table)
->field($field)
->alias("a")
->join("o_order b", "a.order_id = b.id", "left")
->join("office_o_order b", "a.order_id = b.id", "left")
->where($where_)
->select();
}
......@@ -257,8 +257,8 @@ class OfficeOPayLogModel extends Model
return Db::table($this->table)
->field($field)
->alias("a")
->join("o_order b", "a.order_id = b.id", "left")
->join("o_report c", "b.f_id = c.id", "left")
->join("office_o_order b", "a.order_id = b.id", "left")
->join("office_o_report c", "b.f_id = c.id", "left")
->where($where_)
->limit($page_size)
->page($page_no)
......@@ -281,9 +281,11 @@ class OfficeOPayLogModel extends Model
return Db::table($this->table)
->field($field)
->alias("a")
->join("o_order b", "a.order_id = b.id", "left")
->join("g_houses h", "b.house_id = h.id", "left")
->join("o_report c", "b.f_id = c.id", "left")
->join("office_o_order b", "a.order_id = b.id", "left")
// ->join("g_houses h", "b.house_id = h.id", "left")
->join("office_o_report c", "b.f_id = c.id", "left")
->join("office_g_room r", "b.house_id = r.id", "left")
->join("office_g_building s", "r.building_id = s.id", "left")
->where($where_)
->limit($page_size)
->page($page_no)
......@@ -315,8 +317,8 @@ class OfficeOPayLogModel extends Model
return Db::table($this->table)
->field($field)
->alias("a")
->join("o_order b", "a.order_id = b.id", "left")
->join("o_report c", "b.f_id = c.id", "left")
->join("office_o_order b", "a.order_id = b.id", "left")
->join("office_o_report c", "b.f_id = c.id", "left")
//->join('g_houses d','b.house_id = d.id','left')
->where($where_)
->group("a.id")
......@@ -341,7 +343,7 @@ class OfficeOPayLogModel extends Model
$params["a.is_del"] = 0;
return $this->db_->field($field)
->alias("a")
->join("office_o_order b", "a.order_id = b.id", "left")
->join("office_office_o_order b", "a.order_id = b.id", "left")
->join('office_g_room d', 'b.house_id = d.id', 'left')
->join('a_agents e', 'a.agent_id=e.id', 'left')
->join('office_o_bargain f', 'a.bargain_id=f.id', 'left')
......@@ -365,7 +367,7 @@ class OfficeOPayLogModel extends Model
{
$params["a.is_del"] = 0;
return $this->db_->alias("a")
->join("office_o_order b", "a.order_id = b.id", "left")
->join("office_office_o_order b", "a.order_id = b.id", "left")
->join('office_g_room d', 'b.house_id = d.id', 'left')
->join('a_agents e', 'a.agent_id=e.id', 'left')
->join('office_o_bargain f', 'a.bargain_id=f.id', 'left')
......@@ -388,7 +390,7 @@ class OfficeOPayLogModel extends Model
$data = Db::table($this->table)
->alias("a")
->join("o_order b", "a.order_id = b.id", "left")
->join("office_o_order b", "a.order_id = b.id", "left")
->join('g_houses d', 'b.house_id = d.id', 'left')
->join('a_agents e', 'a.agent_id=e.id', 'left')
->join('o_bargain f', 'a.bargain_id=f.id', 'left')
......@@ -397,7 +399,7 @@ class OfficeOPayLogModel extends Model
} else {
$data = Db::table($this->table)
->alias("a")
->join("o_order b", "a.order_id = b.id", "left")
->join("office_o_order b", "a.order_id = b.id", "left")
->join('g_houses d', 'b.house_id = d.id', 'left')
->join('a_agents e', 'a.agent_id=e.id', 'left')
->join('o_bargain f', 'a.bargain_id=f.id', 'left')
......@@ -439,10 +441,10 @@ class OfficeOPayLogModel extends Model
{
return $this->db_->field($filed)
->alias("a")
->join("office_o_order b", "a.order_id = b.id", "left")
->join("office_office_o_order b", "a.order_id = b.id", "left")
// ->join("o_bargain c", "c.order_id = b.id", "left")
->join("office_o_bargain c", "c.id = a.bargain_id", "left")
->join("office_o_report d", "a.report_id = d.id", "left")
->join("office_office_o_report d", "a.report_id = d.id", "left")
->where($params)
->group("a.id")
->select();
......@@ -459,8 +461,8 @@ class OfficeOPayLogModel extends Model
{
$result = $this->db_->field($filed)
->alias("a")
->join("office_o_order b", "a.order_id = b.id", "left")
->join("office_o_report d", "a.report_id = d.id", "left")
->join("office_office_o_order b", "a.order_id = b.id", "left")
->join("office_office_o_report d", "a.report_id = d.id", "left")
->where($params)
->select();
//echo $this->getLastSql();
......@@ -481,7 +483,7 @@ class OfficeOPayLogModel extends Model
return $this->db_->field($filed)
->alias("a")
->join("office_o_paylog_adjustment b", "a.id = b.paylog_id", "right")
->join("office_o_order c", "a.order_id = c.id", "left")
->join("office_office_o_order c", "a.order_id = c.id", "left")
->where($params)
->select();
}
......@@ -542,7 +544,7 @@ class OfficeOPayLogModel extends Model
public function getOrderHouse($field, $where) {
return $this->db_->alias('a')
->field($field)
->join('office_o_order b', 'a.order_id=b.id', 'left')
->join('office_office_o_order b', 'a.order_id=b.id', 'left')
->join('office_g_room c', 'b.house_id=c.id', 'left')
->join('office_g_building d', 'c.building_id=d.id', 'left')
->where($where)
......@@ -627,7 +629,7 @@ class OfficeOPayLogModel extends Model
return $this->db_
->field($field)
->alias("a")
->join("o_report b", "a.report_id = b.id", "left")
->join("office_o_report b", "a.report_id = b.id", "left")
->where($where_)
->order('a.create_time asc')
->find();
......
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