Commit b1a76bc9 authored by zhuwei's avatar zhuwei

youhua

parent a1ba38ae
...@@ -552,28 +552,28 @@ class StatementService ...@@ -552,28 +552,28 @@ class StatementService
* user 朱伟 * user 朱伟
* time 2018-11-23 11:15:02 * time 2018-11-23 11:15:02
*/ */
public function selectStatementForClerk($agent_id, $agent_level, $store_id,$district_id) public function selectStatementForClerk($agent_id, $agent_level, $store_id, $district_id)
{ {
$time_ = date("Y-m-d", time()); $time_ = date("Y-m-d", time());
$conditions['agent_id']=$agent_id; $conditions['agent_id'] = $agent_id;
$conditions['create_time'] = array( 'between', array( $time_ . " 00:00:00", $time_ . " 23:59:59" ) ); $conditions['create_time'] = array( 'between', array( $time_ . " 00:00:00", $time_ . " 23:59:59" ) );
//todo 房源 // 房源
$result["house_num"] = $this->housesToAgents->getAddHouseNumByAgentId($conditions); $result["house_num"] = $this->housesToAgents->getAddHouseNumByAgentId($conditions);
//todo 客源 // 客源
$result["user_num"] = $this->userModel->getAddUserNumByAgentId($conditions); $result["user_num"] = $this->userModel->getAddUserNumByAgentId($conditions);
//todo 带看 (报备) // 带看 (报备)
$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;
//todo 业绩 // 业绩
$performanceSum = $this->bargainModel->getAddBargainNum($conditions, 1);//1表示业绩 2表示实收 $performanceSum = $this->bargainModel->getAddBargainNum($conditions, 1);//1表示业绩 2表示实收
$result["performance"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0; $result["performance"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0;
//todo 本月-业绩 // 本月-业绩
$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 . " 00:00:00", $end_time . " 23:59:59" ) ); $conditions['create_time'] = array( 'between', array( $start_time . " 00:00:00", $end_time . " 23:59:59" ) );
...@@ -581,7 +581,7 @@ class StatementService ...@@ -581,7 +581,7 @@ class StatementService
$performanceSum = $this->bargainModel->getAddBargainNum($conditions, 1);//1表示业绩 2表示实收 $performanceSum = $this->bargainModel->getAddBargainNum($conditions, 1);//1表示业绩 2表示实收
$result["performance_for_month"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0; $result["performance_for_month"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0;
//todo 本月-成交单数 // 本月-成交单数
$performanceSum = $this->bargainModel->getAddBargainNumV2($conditions, 3);//1表示业绩 2表示实收 $performanceSum = $this->bargainModel->getAddBargainNumV2($conditions, 3);//1表示业绩 2表示实收
$result["bargain_sum_for_month"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0; $result["bargain_sum_for_month"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 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