Commit e4409386 authored by zhuwei's avatar zhuwei

查询总监日报数据

parent 11c7737f
...@@ -751,8 +751,24 @@ class StatementService ...@@ -751,8 +751,24 @@ class StatementService
*/ */
public function selectStatementForDistrictWithDay($agent_id, $agent_level, $store_id, $district_id) public function selectStatementForDistrictWithDay($agent_id, $agent_level, $store_id, $district_id)
{ {
$agent_res = $this->getAgentIDsByDistrictId($district_id,$agent_level);
//todo $conditions['agent_id'] = array( "in", $agent_res['agent_ids'] );
// 本月-业绩
$start_time = date("Y-m-01", time());
$end_time = date("Y-m-d", time());
$conditions['create_time'] = array( 'between', array( $start_time . " 00:00:00", $end_time . " 23:59:59" ) );
$performanceSum = $this->bargainModel->getAddBargainNum($conditions, 1);//1表示业绩 2表示实收
$result["performance_for_month"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0;
// 本月-成交单数
$performanceSum = $this->bargainModel->getAddBargainNumV2($conditions, 3);//1表示业绩 2表示实收
$result["bargain_sum_for_month"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0;
//人数
$result["district_team_num"] = $agent_res['store_list_num'];
} }
......
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