Commit 7c26dd17 authored by clone's avatar clone

bug

parent 5974b6ed
......@@ -70,7 +70,7 @@ class Performance extends Basic
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"agent_id" => 4,
"agent_id" => 9,
"start_time" => "2018-04-12",
"end_time" => "2018-04-12",
"is_case" => 2,//1经纪人 2案场
......@@ -101,12 +101,11 @@ class Performance extends Basic
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"agent_id" => 4,
"start_time" => "2018-04-12",
/* $params = array(
"agent_id" => 6,
"start_time" => "2018-04-09",
"end_time" => "2018-04-12",
);*/
try {
$result = $this->service_->storePerformance($params["agent_id"], $params["start_time"], $params["end_time"]);
return $this->response("200", "request success", $result);
......@@ -123,11 +122,11 @@ class Performance extends Basic
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"agent_id" => 4,
"start_time" => "2018-03-13",
"end_time" => "2018-04-10",
"is_case" => 2,//1经纪人 2案场
/* $params = array(
"agent_id" => 6,
"start_time" => "2018-04-09",
"end_time" => "2018-04-12",
"is_case" => 1,//1经纪人 2案场
"house_id" => 0,
"type" => 1 // 1带看 2进场 3收款 4成交报告
);*/
......@@ -156,10 +155,10 @@ class Performance extends Basic
public function storeOrAgentSort(){
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
/* $params = array(
"agent_id" => 6,
"is_store" => 2,//1经纪人排行 2门店
"start_time" => "2018-04-12",
"is_store" => 1,//1经纪人排行 2门店
"start_time" => "2018-04-09",
"end_time" => "2018-04-12",
);*/
......
......@@ -341,6 +341,7 @@ class PerformanceService
$params['total_time'] = array( 'between', array( $start_time, $end_time ) );
$list = $this->totalModel->getTotalByAgentId($field, $params, $type, "");
// dump($list);
if (count($list) > 0) {
$list = $list[0];
}
......@@ -370,15 +371,16 @@ class PerformanceService
return null;
}
$verify = new VerifyService();
$agent_ids = $verify->getAgentsByAgentId($agent_id);
$params["agent_id"] = array( "in", $agent_ids );
$list = [];
$now_date = date("Y-m-d", time());
if ($start_time == $now_date && $end_time == $now_date) {
$verify = new VerifyService();
$agent_ids = $verify->getAgentsByAgentId($agent_id);
/* $params["id"] = array( "in", $agent_ids );
// dump($agent_ids);
$params["id"] = array( "in", $agent_ids );
//todo 1.获取所有经纪人
$field = "id as agent_id,store_id";
$group = "";
......@@ -417,7 +419,7 @@ class PerformanceService
if($sum <= 0){
unset($list[$key]);
}
}
}*/
} else {
......
......@@ -87,7 +87,7 @@ class TAgentTotalModel extends Model
->group($group_)
->order($order)
->select();
// echo $this->db_->getLastSql();
//echo $this->db_->getLastSql();
return $result;
}
......
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