Commit eac73ff2 authored by zhuwei's avatar zhuwei

月房源 客源 带看

parent 02128451
...@@ -190,15 +190,12 @@ class Statement extends Basic ...@@ -190,15 +190,12 @@ class Statement extends Basic
return $this->response($code, $msg, $data); return $this->response($code, $msg, $data);
} }
/** /**
* 店长或总监日报周报数据接口 * 店长或总监日报周报数据接口
* @return \think\Response * @return \think\Response
* user 朱伟 * @throws \think\db\exception\DataNotFoundException
* time 2018-11-23 11:15:02 * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function dayOrWeekStatement() public function dayOrWeekStatement()
{ {
......
...@@ -96,6 +96,7 @@ class StatementService ...@@ -96,6 +96,7 @@ class StatementService
private function selectStatement($conditions, $user_type, $store_id, $district_id, $day_or_week,$agent_id) private function selectStatement($conditions, $user_type, $store_id, $district_id, $day_or_week,$agent_id)
{ {
//房源 客源 带看 月完成
$result = $params = []; $result = $params = [];
switch ($user_type) { switch ($user_type) {
case 0: case 0:
...@@ -151,9 +152,19 @@ class StatementService ...@@ -151,9 +152,19 @@ class StatementService
$addMarchInNum = $this->marchInModel->getAddMarchInNum($conditions); $addMarchInNum = $this->marchInModel->getAddMarchInNum($conditions);
$result["follow_up_num"] = isset($addMarchInNum[0]["num"]) ? $addMarchInNum[0]["num"] : 0; $result["follow_up_num"] = isset($addMarchInNum[0]["num"]) ? $addMarchInNum[0]["num"] : 0;
//本月业绩 //本月时间
$start_time = date("Y-m-01", time()); $start_time = date("Y-m-01", time());
$end_time = date("Y-m-d", time()); $end_time = date("Y-m-d", time());
$conditions['create_time'] = array( 'between', array( $start_time, $end_time ) );
#月房源
$result["house_num_month"] = $this->housesToAgents->getAddHouseNumByAgentId($conditions);
#月客源
$result["user_num_month"] = $this->userModel->getAddUserNumByAgentId($conditions);
//月带看(报备)
$addMarchInNum = $this->marchInModel->getAddMarchInNum($conditions);
$result["follow_up_num_month"] = isset($addMarchInNum[0]["num"]) ? $addMarchInNum[0]["num"] : 0;
if ($user_type == 2) {//如果是总监 if ($user_type == 2) {//如果是总监
$where_["district_id"] = $district_id; $where_["district_id"] = $district_id;
} else if ($user_type == 0){ } else if ($user_type == 0){
......
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