Commit eac73ff2 authored by zhuwei's avatar zhuwei

月房源 客源 带看

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