Commit a770642e authored by zw's avatar zw

业绩统计

parent aa3030db
...@@ -474,10 +474,11 @@ Route::group('task', [ ...@@ -474,10 +474,11 @@ Route::group('task', [
'saveLookShop' => [ 'task/SaveLookShopHistoryTask/saveLookShop', [ 'method' => 'get' ] ], //保存看铺记录 'saveLookShop' => [ 'task/SaveLookShopHistoryTask/saveLookShop', [ 'method' => 'get' ] ], //保存看铺记录
'totalAgentResults_new' => [ 'task/ResultsSummaryTask/totalAgentResults', [ 'method' => 'get' ] ], //业绩统计 'totalAgentResults_new' => [ 'task/ResultsSummaryTask/totalAgentResults', [ 'method' => 'get' ] ], //业绩统计
'totalAgentResults' => [ 'task/ResultsSummaryNewTask/totalAgentResults', [ 'method' => 'get' ] ], //业绩统计 'totalAgentResults' => [ 'task/ResultsSummaryNewTask/totalAgentResults', [ 'method' => 'get' ] ], //业绩统计
'totalAgentResultsByTime' => [ 'task/ResultsSummaryNewTask/totalAgentResultsByTime', [ 'method' => 'get' ] ], //业绩统计 'totalAgentResultsByTime' => [ 'task/ResultsSummaryNewTask/totalAgentResultsByTime', [ 'method' => 'get' ] ], //业绩统计
'updateTotalByAgentId' => [ 'task/ResultsSummaryNewTask/updateTotalByAgentId', [ 'method' => 'get' ] ], //业绩统计 'updateTotalByAgentId' => [ 'task/ResultsSummaryNewTask/updateTotalByAgentId', [ 'method' => 'get' ] ], //业绩统计
'totalAgentResultsByYesterday' => [ 'task/ResultsSummaryNewTask/totalAgentResultsByYesterday', [ 'method' => 'get' ] ], //业绩统计
'rongBilledInformUrl' => [ 'task/PrivacyNumber/rongBilledInformUrl', [ 'method' => 'post | get' ] ],//隐私号码回调[话单通知] 'rongBilledInformUrl' => [ 'task/PrivacyNumber/rongBilledInformUrl', [ 'method' => 'post | get' ] ],//隐私号码回调[话单通知]
......
...@@ -106,6 +106,31 @@ class ResultsSummaryNewTask ...@@ -106,6 +106,31 @@ class ResultsSummaryNewTask
unset($this->payLogModel); unset($this->payLogModel);
}
public function totalAgentResultsByYesterday()
{
set_time_limit(0); // 取消脚本运行时间的超时上限
$total_time = date("Y-m-d",strtotime("-1 day"));
$total = $this->agentsModel->getAgentsCountByTask();
$pageSize = 20;
$pageTotal = ceil($total / $pageSize);
for ($pageNo = 1; $pageNo <= $pageTotal; $pageNo++) {
$resultArr = $this->agentsModel->getAgentsListByTask($pageNo, $pageSize, "id,store_id,district_id");
$this->executeTotal($resultArr, $total_time);
unset($resultArr);
}
unset($this->agentsModel);
unset($this->tAgentTotalModel);
unset($this->houseModel);
unset($this->userModel);
unset($this->bargainModel);
unset($this->reportModel);
unset($this->marchInModel);
unset($this->payLogModel);
} }
/** /**
......
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