Commit 8a998c34 authored by zhuwei's avatar zhuwei Committed by hujun

1

parent ba95df31
......@@ -53,7 +53,7 @@ class OfficePerformance extends Basic
//判断是否是导出EXCEL
$is_excel = !empty($params["is_excel"]) ? $params["is_excel"] : '' ;
if($is_excel == 1){
$list = $this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
$this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
}
$list = $this->service_->totalAgent($params["type"], $end_day, $start_day,$pageNo,$pageSize,$father_id,$params);
//dump($list);
......
......@@ -55,10 +55,9 @@ class Performance extends Basic
//判断是否是导出EXCEL
$is_excel = !empty($params["is_excel"]) ? $params["is_excel"] : '' ;
if($is_excel == 1){
$list = $this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
$this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
}
$list = $this->service_->totalAgent($params["type"], $end_day, $start_day,$pageNo,$pageSize,$father_id,$params);
//dump($list);
if (count($list) > 0) {
$result["list"] = $list['list'];
$result["total"] = $list['total'];
......@@ -73,8 +72,6 @@ class Performance extends Basic
}
// 门店排行 Store
/**
* 门店排行
......@@ -101,7 +98,7 @@ class Performance extends Basic
//判断是否是导出EXCEL
$is_excel = !empty($params["is_excel"]) ? $params["is_excel"] : '' ;
if($is_excel == 1){
$list = $this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
$this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
}
$list = $this->service_->totalAgent($params["type"], $end_day, $start_day,$pageNo,$pageSize,$father_id,$params);
if (count($list) > 0) {
......@@ -119,8 +116,6 @@ class Performance extends Basic
}
// 个人业绩排行 Individual
/**
* 个人业绩排行
......@@ -150,10 +145,9 @@ class Performance extends Basic
//判断是否是导出EXCEL
$is_excel = !empty($params["is_excel"]) ? $params["is_excel"] : '' ;
if($is_excel == 1){
$list = $this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
$this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
}
$list = $this->service_->totalAgent($params["type"], $end_day, $start_day,$pageNo,$pageSize,$father_id,$params);
//dump($list);
if (count($list) > 0) {
$result["list"] = $list['list'];
$result["total"] = $list['total'];
......
......@@ -51,19 +51,19 @@ class OfficePerformanceService
/**
* @param $agent_id
* @param $type
* @param $yesterday
* @param $end_day
* @param $pageNo
* @param $pageSize
* @param $father_id
* @param $params
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function totalAgent($type, $yesterday, $end_day,$pageNo,$pageSize,$father_id,$params)
{
$order_ = $params['order'];
$where_ = [];
$where_["a.is_del"] = 0;
if($father_id){
if($type == 1){
$where_['a.store_id'] = $father_id;
......@@ -308,8 +308,7 @@ class OfficePerformanceService
*/
public function totalAgentExcel($type, $yesterday, $end_day,$father_id,$params)
{
$where_ = [];
$where_["a.is_del"] = 0;
$e_data_new = [];
if($father_id){
if($type == 1){
......
......@@ -64,7 +64,8 @@ class PerformanceService
public function totalAgent($type, $yesterday, $end_day,$pageNo,$pageSize,$father_id,$params)
{
$order_ = $params['order'];
$where_ = [];
$where_["a.is_del"] = 0;
if($father_id){
if($type == 1){
$where_['a.store_id'] = $father_id;
......@@ -329,8 +330,7 @@ class PerformanceService
*/
public function totalAgentExcel($type, $yesterday, $end_day,$father_id,$params)
{
$where_ = [];
$where_["a.is_del"] = 0;
$e_data_new = [];
if($father_id){
if($type == 1){
......
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