Commit 03b0dac1 authored by hujun's avatar hujun

office_

parent f1423ec4
...@@ -379,7 +379,7 @@ class OfficeOReportModel extends Model ...@@ -379,7 +379,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_paylog` `c` ON `b`.`id` = `c`.`order_id` RIGHT JOIN `office_o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE WHERE
$house_str $house_str
...@@ -399,7 +399,7 @@ class OfficeOReportModel extends Model ...@@ -399,7 +399,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id` RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE WHERE
$report_agent_str $report_agent_str
...@@ -414,7 +414,7 @@ class OfficeOReportModel extends Model ...@@ -414,7 +414,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id` RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE WHERE
$house_str $house_str
...@@ -436,7 +436,7 @@ class OfficeOReportModel extends Model ...@@ -436,7 +436,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_g_room` `c` ON `b`.`house_id` = `c`.`id` LEFT JOIN `office_g_room` `c` ON `b`.`house_id` = `c`.`id`
LEFT JOIN `office_g_building` `d` ON `d`.`id` = `c`.`building_id` LEFT JOIN `office_g_building` `d` ON `d`.`id` = `c`.`building_id`
WHERE WHERE
...@@ -448,7 +448,7 @@ class OfficeOReportModel extends Model ...@@ -448,7 +448,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_g_room` `c` ON `b`.`house_id` = `c`.`id` LEFT JOIN `office_g_room` `c` ON `b`.`house_id` = `c`.`id`
LEFT JOIN `office_g_building` `d` ON `d`.`id` = `c`.`building_id` LEFT JOIN `office_g_building` `d` ON `d`.`id` = `c`.`building_id`
WHERE WHERE
...@@ -524,7 +524,7 @@ class OfficeOReportModel extends Model ...@@ -524,7 +524,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_march_in` `c` ON `b`.`id` = `c`.`order_id` RIGHT JOIN `office_o_march_in` `c` ON `b`.`id` = `c`.`order_id`
WHERE WHERE
`a`.`report_agent_id` IN ($report_agent_id ) `a`.`report_agent_id` IN ($report_agent_id )
...@@ -537,7 +537,7 @@ class OfficeOReportModel extends Model ...@@ -537,7 +537,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_march_in` `c` ON `b`.`id` = `c`.`order_id` RIGHT JOIN `office_o_march_in` `c` ON `b`.`id` = `c`.`order_id`
WHERE WHERE
`b`.`house_id` IN ($house_ids) `b`.`house_id` IN ($house_ids)
...@@ -558,7 +558,7 @@ class OfficeOReportModel extends Model ...@@ -558,7 +558,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_paylog` `c` ON `b`.`id` = `c`.`order_id` RIGHT JOIN `office_o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE WHERE
`a`.`report_agent_id` IN ($report_agent_id ) `a`.`report_agent_id` IN ($report_agent_id )
...@@ -573,7 +573,7 @@ class OfficeOReportModel extends Model ...@@ -573,7 +573,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_paylog` `c` ON `b`.`id` = `c`.`order_id` RIGHT JOIN `office_o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE WHERE
`b`.`house_id` IN ($house_ids) `b`.`house_id` IN ($house_ids)
...@@ -593,7 +593,7 @@ class OfficeOReportModel extends Model ...@@ -593,7 +593,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id` RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE WHERE
`a`.`report_agent_id` IN ($report_agent_id ) `a`.`report_agent_id` IN ($report_agent_id )
...@@ -608,7 +608,7 @@ class OfficeOReportModel extends Model ...@@ -608,7 +608,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id` RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE WHERE
`b`.`house_id` IN ($house_ids) `b`.`house_id` IN ($house_ids)
...@@ -628,7 +628,7 @@ class OfficeOReportModel extends Model ...@@ -628,7 +628,7 @@ class OfficeOReportModel extends Model
$filed $filed
FROM FROM
`office_o_report` `a` `office_o_report` `a`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id` LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
WHERE WHERE
`a`.`report_agent_id` IN ($report_agent_id ) `a`.`report_agent_id` IN ($report_agent_id )
AND `a`.`status` = 0 AND `a`.`status` = 0
...@@ -727,7 +727,7 @@ class OfficeOReportModel extends Model ...@@ -727,7 +727,7 @@ class OfficeOReportModel extends Model
$result = Db::table($this->table) $result = Db::table($this->table)
->field($field) ->field($field)
->alias("a") ->alias("a")
->join("office_office_o_order b", "a.id = b.f_id", "left") ->join("office_o_order b", "a.id = b.f_id", "left")
->where($where_) ->where($where_)
->select(); ->select();
return $result; return $result;
...@@ -760,7 +760,7 @@ class OfficeOReportModel extends Model ...@@ -760,7 +760,7 @@ class OfficeOReportModel extends Model
$result = $this->db->field($field) $result = $this->db->field($field)
->alias("a") ->alias("a")
->join("a_agents d", "a.report_agent_id = d.id", "left") ->join("a_agents d", "a.report_agent_id = d.id", "left")
->join("office_office_o_order b", "a.id = b.f_id", "left") ->join("office_o_order b", "a.id = b.f_id", "left")
->join("office_g_room c", "b.house_id = c.id", "left") ->join("office_g_room c", "b.house_id = c.id", "left")
->join("office_g_building e", "c.building_id = e.id", "left") ->join("office_g_building e", "c.building_id = e.id", "left")
->where($params) ->where($params)
...@@ -779,7 +779,7 @@ class OfficeOReportModel extends Model ...@@ -779,7 +779,7 @@ class OfficeOReportModel extends Model
{ {
$result = $this->db->alias("a") $result = $this->db->alias("a")
->join("a_agents d", "a.report_agent_id = d.id", "left") ->join("a_agents d", "a.report_agent_id = d.id", "left")
->join("office_office_o_order b", "a.id = b.f_id", "left") ->join("office_o_order b", "a.id = b.f_id", "left")
->join("office_g_room c", "b.house_id = c.id", "left") ->join("office_g_room c", "b.house_id = c.id", "left")
->join("office_g_building e", "c.building_id = e.id", "left") ->join("office_g_building e", "c.building_id = e.id", "left")
->where($params) ->where($params)
......
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