Commit dd4b8b77 authored by zw's avatar zw

日报周报 bug

parent 204f8e5c
......@@ -5,6 +5,7 @@ namespace app\api_broker\service;
use app\model\AAgents;
use app\model\FollowUpLogModel;
use app\model\GHouses;
use app\model\OReportModel;
use app\model\Users;
/**
......@@ -21,6 +22,7 @@ class StatementService
private $houseModel;
private $userModel;
private $followUpModel;
private $reportModel;
const USER_LEVEL_FIST = 0; //经纪人
const USER_LEVEL_SECOND = 1; //店长
......@@ -32,6 +34,7 @@ class StatementService
$this->houseModel = new GHouses();
$this->userModel = new Users();
$this->followUpModel = new FollowUpLogModel();
$this->reportModel = new OReportModel();
}
/**
......@@ -127,7 +130,8 @@ class StatementService
$result["agent_total"] = $agent_total;
$result["house_num"] = $this->houseModel->getAddHouseNumByAgentId($conditions);
$result["user_num"] = $this->userModel->getAddUserNumByAgentId($conditions);
$result["follow_up_num"] = $this->followUpModel->getAddFollowUpNumByAgentId($conditions);
//$result["follow_up_num"] = $this->followUpModel->getAddFollowUpNumByAgentId($conditions);
$result["follow_up_num"] = $this->reportModel->getAddFollowUpNumByAgentId($conditions);
//todo
$result["store_list"] = $store_list;
......
......@@ -448,4 +448,22 @@ class OReportModel extends Model
->where($params)
->select();
}
/**
* 获取经纪人新增带看数量
* @param $params
* @return int|string
*/
public function getAddFollowUpNumByAgentId($params){
$where_ = [];
if(isset($params["agent_id"])){
$where_["report_agent_id"] = $params["agent_id"];
}
if(isset($params["create_time"])){
$where_["create_time"] = $params["create_time"];
}
return Db::name($this->table)
->where($where_)
->count();
}
}
\ No newline at end of file
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