Commit e94beade authored by zhuwei's avatar zhuwei

1

parent 83b6b5f5
......@@ -157,7 +157,7 @@ class OfficeOMarchInModel 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();
//echo $this->getLastSql();
......@@ -186,7 +186,7 @@ class OfficeOMarchInModel extends Model
$return = Db::table($this->table)
->field("count(1) as num,max(a.create_time) as create_time")
->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();
return $return;
......@@ -213,7 +213,7 @@ class OfficeOMarchInModel 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.reception_id = c.id", "left")
->where($where_)
->order("a.create_time desc")
......@@ -246,8 +246,8 @@ class OfficeOMarchInModel 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)
......@@ -269,8 +269,8 @@ class OfficeOMarchInModel 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('a_store e', 'c.report_store_id = e.id', 'left')
->where($where_)
->limit($page_size)
......@@ -293,8 +293,8 @@ class OfficeOMarchInModel 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('a_store e', 'c.report_store_id = e.id', 'left')
->where($where_)
->count();
......@@ -315,8 +315,8 @@ class OfficeOMarchInModel 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_)
->select();
......@@ -334,7 +334,7 @@ class OfficeOMarchInModel 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.reception_id = c.id", "left")
->join("a_store d", "c.store_id = d.id", "left")
->where($where_)
......@@ -348,8 +348,8 @@ class OfficeOMarchInModel extends Model
->field($field)
->alias('a')
->join('a_agents b', 'a.reception_id = b.id', 'left')
->join('office_o_order c', 'a.order_id = c.id', 'left')
->join('office_o_report d', 'a.report_id = d.id', 'left')
->join('office_office_o_order c', 'a.order_id = c.id', 'left')
->join('office_office_o_report d', 'a.report_id = d.id', 'left')
->join('a_store e', 'd.report_store_id = e.id', 'left')
->join('office_g_room f', 'c.house_id = f.id', 'left')
->join('office_g_building g', 'f.building_id = g.id', 'left')
......@@ -372,8 +372,8 @@ class OfficeOMarchInModel extends Model
return $this->field($field)
->alias('a')
->join('a_agents b', 'a.reception_id = b.id', 'left')
->join('office_o_order c', 'a.order_id = c.id', 'left')
->join('office_o_report d', 'a.report_id = d.id', 'left')
->join('office_office_o_order c', 'a.order_id = c.id', 'left')
->join('office_office_o_report d', 'a.report_id = d.id', 'left')
->join('a_store e', 'd.report_store_id = e.id', 'left')
->join('office_g_room f', 'c.house_id = f.id', 'left')
->join('office_g_building g', 'f.building_id = g.id', 'left')
......@@ -392,7 +392,7 @@ class OfficeOMarchInModel extends Model
//dump($params);
$return = 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 c', 'b.house_id = c.id', 'LEFT')
->where($params)
->count();
......@@ -411,7 +411,7 @@ class OfficeOMarchInModel extends Model
public function getMaxMarchInAgent($field, $where) {
return $this->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')
->where($where)
->group('a.reception_id ')
->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