Commit eac9d5f6 authored by zw's avatar zw

带看列表

parent 3b2faff0
...@@ -109,10 +109,10 @@ class Report extends Basic ...@@ -109,10 +109,10 @@ class Report extends Basic
public function reportList() public function reportList()
{ {
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"agent_id" =>6446, "agent_id" =>5741,
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告 "type" => 2,//1表示全部 2表示进场 3 表示收款 4成交报告
"is_all"=>0,//0搜索我自己的,1全部 "is_all"=>1,//0搜索我自己的,1全部
"page_no"=>1, "page_no"=>1,
"page_size"=>15 "page_size"=>15
);*/ );*/
......
...@@ -106,13 +106,11 @@ class ReportService ...@@ -106,13 +106,11 @@ class ReportService
*/ */
public function orderList($field, $params, $pageNo, $pageSize) public function orderList($field, $params, $pageNo, $pageSize)
{ {
//todo 获取我报备的我的案场的,如果是店长则获取其下所有的经纪人 //todo 获取我报备的我的案场的,
//如果是店长则获取其下所有的经纪人 这里去掉了for190218
$vModel = new VerifyService(); $vModel = new VerifyService();
$agentArr = $vModel->getAgentsByAgentId($params["report_agent_id"]); // $agentArr = $vModel->getAgentsByAgentId($params["report_agent_id"]);
if ($agentArr) { $params["agent_id_s"] = array( "in", $params["report_agent_id"] );
$params["agent_id_s"] = array( "in", $agentArr );
$params["report_agent_id"] = $agentArr;
}
$caseHouseId = $vModel->getCaseHouseIdByAgentId($params["agent_id_s"]); $caseHouseId = $vModel->getCaseHouseIdByAgentId($params["agent_id_s"]);
$ids = ""; $ids = "";
...@@ -188,8 +186,7 @@ class ReportService ...@@ -188,8 +186,7 @@ class ReportService
*/ */
public function orderListAll($field, $params, $pageNo, $pageSize) public function orderListAll($field, $params, $pageNo, $pageSize)
{ {
$params = []; $result = $this->oReportModel->selectReportListAll($field, $params, $pageNo, $pageSize);
$result = $this->oReportModel->selectReportList($field, $params, $pageNo, $pageSize);
return $this->returnResult($result); return $this->returnResult($result);
} }
......
...@@ -186,6 +186,61 @@ class OReportModel extends Model ...@@ -186,6 +186,61 @@ class OReportModel extends Model
->select(); ->select();
} }
public function selectReportListAll($filed = "id", $params, $pageNo, $pageSize){
$result = [];
$where["a.status"] = 0;
$where["b.is_del"] = 0;
switch ($params["type"]) {
case 2:
$result = $this->db->field($filed)
->alias("a")
->join("o_order b", "a.id=b.f_id", "left")
->join("o_march_in c", "b.id=c.order_id", "right")
->where($where)
->order("b.id desc")
->page($pageNo)
->limit($pageSize)
->select();
break;
case 3:
$result = $this->db->field($filed)
->alias("a")
->join("o_order b", "a.id=b.f_id", "left")
->join("o_paylog c", "b.id=c.order_id", "right")
->where($where)
->order("b.id desc")
->page($pageNo)
->limit($pageSize)
->select();
break;
case 4:
$result = $this->db->field($filed)
->alias("a")
->join("o_order b", "a.id=b.f_id", "left")
->join("o_bargain c", "b.id=c.order_id", "right")
->where($where)
->order("b.id desc")
->page($pageNo)
->limit($pageSize)
->select();
break;
default:
$result = $this->db->field($filed)
->alias("a")
->join("o_order b", "a.id=b.f_id", "left")
->where($where)
->order("b.id desc")
->page($pageNo)
->limit($pageSize)
->select();
}
//echo $this->getLastSql();
return $result;
}
/** /**
* @param string $filed * @param string $filed
* @param $params * @param $params
...@@ -370,7 +425,7 @@ class OReportModel extends Model ...@@ -370,7 +425,7 @@ class OReportModel extends Model
$result = $this->db->query($sql); $result = $this->db->query($sql);
//echo $this->getLastSql(); // echo $this->getLastSql();
return $result; return $result;
} }
...@@ -1002,3 +1057,8 @@ class OReportModel extends Model ...@@ -1002,3 +1057,8 @@ class OReportModel extends Model
return $this->db->where($where)->value($field); return $this->db->where($where)->value($field);
} }
} }
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