Commit f594d3d4 authored by zhuwei's avatar zhuwei Committed by hujun

bug

parent 38a37c86
...@@ -216,7 +216,7 @@ class Statement extends Basic ...@@ -216,7 +216,7 @@ class Statement extends Basic
$params = $this->params; $params = $this->params;
$params = array( $params = array(
"agent_id" => 5741,//5739 总监 5740店长 5741总监 "agent_id" => 5741,//5739 总监 5740店长 5741总监
"type" => 1,//0 日报 1 周报 "type" => 0,//0 日报 1 周报
); );
if (!isset($params["agent_id"]) || !isset($params["type"]) ) { if (!isset($params["agent_id"]) || !isset($params["type"]) ) {
...@@ -247,9 +247,9 @@ class Statement extends Basic ...@@ -247,9 +247,9 @@ class Statement extends Basic
}else{// 周报 }else{// 周报
$result = $this->service_->selectStatementForStoreWithWeek($params["agent_id"], $agent_level, $store_id,$district_id); $result = $this->service_->selectStatementForStoreWithWeek($params["agent_id"], $agent_level, $store_id,$district_id);
} }
} else {//todo 2总监 } else {// 2总监
$agent_level = 2; $agent_level = 2;
if($params["type"] == 0 ){//todo 日报 if($params["type"] == 0 ){//日报
$result = $this->service_->selectStatementForDistrictWithDay($params["agent_id"], $agent_level, $store_id,$district_id); $result = $this->service_->selectStatementForDistrictWithDay($params["agent_id"], $agent_level, $store_id,$district_id);
}else{//todo 周报 }else{//todo 周报
......
...@@ -742,18 +742,20 @@ class StatementService ...@@ -742,18 +742,20 @@ class StatementService
return $result; return $result;
} }
/** /**
* 查询总监日报数据 * 查询总监日报数据
* @param $agent_id * @param $agent_id
* @param $agent_level * @param $agent_level
* @param $store_id * @param $store_id
* @param $district_id * @param $district_id
* @return mixed
* http://showdoc.tonglianjituan.com/index.php?s=/1&page_id=701 * http://showdoc.tonglianjituan.com/index.php?s=/1&page_id=701
*/ */
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); $agent_res = $this->getAgentIDsByDistrictId($district_id,$agent_level);
$conditions['agent_id'] = array( "in", $agent_res['agent_ids'] ); $conditions['agent_id'] = array( "in", $agent_res['agent_ids'] );
// 本月-业绩 // 本月-业绩
...@@ -770,7 +772,7 @@ class StatementService ...@@ -770,7 +772,7 @@ class StatementService
//人数 //人数
$result["district_team_num"] = $agent_res['store_list_num']; $result["district_team_num"] = $agent_res['store_list_num'];
return $result;
} }
/** /**
......
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