Commit adeb962a authored by zhuwei's avatar zhuwei

bug

parent fbe5449c
......@@ -104,7 +104,7 @@ class OfficePerformanceService
$params = $this->getAgentIdPcInfo($id, $type, $start_time, $end_time);
if (!$params)
return [ "code" => 101, "date" => "传入的参数错误" ];
$field = "a.id,a.user_name,a.user_phone,a.predict_see_time,a.create_time,a.report_agent_name,c.internal_title as house_title,c.shop_type,e.store_name,b.id as order_id";
$field = "a.id,a.user_name,a.user_phone,a.predict_see_time,a.create_time,a.report_agent_name,d.title as house_title,d.type,e.store_name,b.id as order_id";
$reportList = $this->reportModel->getAddReportListPcInfo($params, $field, $page_no, $page_size);
$reportListTotal = $this->reportModel->getAddReportListPcInfoTotal($params, $field);
foreach ($reportList as $key => $val) {
......
......@@ -155,7 +155,7 @@ class OfficeOReportModel extends Model
return $this->db
->field($filed)
->alias("a")
->join("office_o_order b", "a.id = b.f_id", "left")
->join("office_office_o_order b", "a.id = b.f_id", "left")
->join("a_agents c", "a.report_agent_id = c.id", "left")
->join("a_store d", "c.store_id = d.id", "left")
->where($where_)
......@@ -181,7 +181,7 @@ class OfficeOReportModel extends Model
}
return $this->db->field($filed)
->alias("a")
->join("o_order b", "a.id = b.f_id", "left")
->join("office_o_order b", "a.id = b.f_id", "left")
->join("a_agents c", "a.report_agent_id = c.id", "left")
->where($where_)
->order("a.create_time desc")
......@@ -198,7 +198,7 @@ class OfficeOReportModel extends Model
case 2:
$result = $this->db->field($filed)
->alias("a")
->join("office_o_order b", "a.id=b.f_id", "left")
->join("office_office_o_order b", "a.id=b.f_id", "left")
->join("office_o_march_in c", "b.id=c.order_id", "right")
->where($where)
->order("b.id desc")
......@@ -209,7 +209,7 @@ class OfficeOReportModel extends Model
case 3:
$result = $this->db->field($filed)
->alias("a")
->join("office_o_order b", "a.id=b.f_id", "left")
->join("office_office_o_order b", "a.id=b.f_id", "left")
->join("office_o_paylog c", "b.id=c.order_id", "right")
->where($where)
->order("b.id desc")
......@@ -221,7 +221,7 @@ class OfficeOReportModel extends Model
case 4:
$result = $this->db->field($filed)
->alias("a")
->join("office_o_order b", "a.id=b.f_id", "left")
->join("office_office_o_order b", "a.id=b.f_id", "left")
->join("office_o_bargain c", "b.id=c.order_id", "right")
->where($where)
->order("b.id desc")
......@@ -233,7 +233,7 @@ class OfficeOReportModel extends Model
default:
$result = $this->db->field($filed)
->alias("a")
->join("office_o_order b", "a.id=b.f_id", "left")
->join("office_office_o_order b", "a.id=b.f_id", "left")
->where($where)
->order("b.id desc")
->page($pageNo)
......@@ -331,7 +331,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_march_in` `c` ON `b`.`id` = `c`.`order_id`
WHERE
$report_agent_str
......@@ -344,7 +344,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_march_in` `c` ON `b`.`id` = `c`.`order_id`
WHERE
$house_str
......@@ -364,7 +364,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE
$report_agent_str
......@@ -379,7 +379,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE
$house_str
......@@ -399,7 +399,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE
$report_agent_str
......@@ -414,7 +414,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE
$house_str
......@@ -436,7 +436,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_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_building` `d` ON `d`.`id` = `c`.`building_id`
WHERE
......@@ -448,7 +448,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_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_building` `d` ON `d`.`id` = `c`.`building_id`
WHERE
......@@ -524,7 +524,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_march_in` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`a`.`report_agent_id` IN ($report_agent_id )
......@@ -537,7 +537,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_march_in` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`b`.`house_id` IN ($house_ids)
......@@ -558,7 +558,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`a`.`report_agent_id` IN ($report_agent_id )
......@@ -573,7 +573,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_paylog` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`b`.`house_id` IN ($house_ids)
......@@ -593,7 +593,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`a`.`report_agent_id` IN ($report_agent_id )
......@@ -608,7 +608,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
RIGHT JOIN `office_o_bargain` `c` ON `b`.`id` = `c`.`order_id`
WHERE
`b`.`house_id` IN ($house_ids)
......@@ -628,7 +628,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`office_o_report` `a`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_office_o_order` `b` ON `a`.`id` = `b`.`f_id`
WHERE
`a`.`report_agent_id` IN ($report_agent_id )
AND `a`.`status` = 0
......@@ -638,7 +638,7 @@ class OfficeOReportModel extends Model
$filed
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `a`.`id` = `b`.`f_id`
LEFT JOIN `office_o_order` `b` ON `a`.`id` = `b`.`f_id`
WHERE
`b`.`house_id` IN ($house_ids)
AND `a`.`status` = 0
......@@ -727,7 +727,7 @@ class OfficeOReportModel extends Model
$result = Db::table($this->table)
->field($field)
->alias("a")
->join("office_o_order b", "a.id = b.f_id", "left")
->join("office_office_o_order b", "a.id = b.f_id", "left")
->where($where_)
->select();
return $result;
......@@ -760,7 +760,7 @@ class OfficeOReportModel extends Model
$result = $this->db->field($field)
->alias("a")
->join("a_agents d", "a.report_agent_id = d.id", "left")
->join("office_o_order b", "a.id = b.f_id", "left")
->join("office_office_o_order b", "a.id = b.f_id", "left")
->join("office_g_room c", "b.house_id = c.id", "left")
->join("office_g_building e", "c.building_id = e.id", "left")
->where($params)
......@@ -779,7 +779,7 @@ class OfficeOReportModel extends Model
{
$result = $this->db->alias("a")
->join("a_agents d", "a.report_agent_id = d.id", "left")
->join("office_o_order b", "a.id = b.f_id", "left")
->join("office_office_o_order b", "a.id = b.f_id", "left")
->join("office_g_room c", "b.house_id = c.id", "left")
->join("office_g_building e", "c.building_id = e.id", "left")
->where($params)
......@@ -813,8 +813,9 @@ class OfficeOReportModel extends Model
$result = Db::table($this->table)
->field($field)
->alias("a")
->join("o_order b", "a.id = b.f_id", "left")
->join("g_houses c", "b.house_id = c.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_building d", "c.building_id = d.id", "left")
->join('a_store e', 'a.report_store_id = e.id', 'left')
->where($where_)
......@@ -841,10 +842,10 @@ class OfficeOReportModel extends Model
$result = Db::table($this->table)
->field($field)
->alias("a")
->join("o_order b", "a.id = b.f_id", "left")
->join("g_houses c", "b.house_id = c.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_building d", "c.building_id = d.id", "left")
->join('a_store e', 'a.report_store_id = e.id', 'left')
->where($where_)
->count();
//echo Db::table($this->table)->getLastSql();
......
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