Commit 2c5732a8 authored by clone's avatar clone

bug

parent 370629d4
......@@ -104,7 +104,7 @@ Route::group('index', [
'getAgentsTohouses' => [ 'index/broker/getAgentsTohouses', [ 'method' => 'GET' ] ], //获取经纪人和楼盘关系信息
'getAgentDistrictStore' => [ 'index/broker/getAgentDistrictStore', [ 'method' => 'GET' ] ], //获取经纪人id获取部门门店名称
'batchChangDish' => [ 'index/houses/batchChangDish', [ 'method' => 'post' ] ],//批量修改盘方
'transformLandlord' => [ 'index/houses/transformLandlord', [ 'method' => 'post' ] ],//转换房东手机号
'transformLandlord' => [ 'index/houses/transformLandlord', [ 'method' => 'post' ] ],//转换房东手机号
//版本管理
'version' => [ 'index/version/index', [ 'method' => 'get' ] ],
......@@ -198,7 +198,7 @@ Route::group('index', [
'reportListTwo/:check_status' => [ 'index/Finance/reportList', [ 'method' => 'get' ], [ 'check_status' => 2 ] ], //财务 成交报告-未结单-第二级审核
'reportListThree/:check_status' => [ 'index/Finance/reportList', [ 'method' => 'get' ], [ 'check_status' => 3 ] ], //财务 成交报告-未结单-第三级审核
'reportListStatement/:check_status' => [ 'index/Finance/reportList', [ 'method' => 'get' ], [ 'check_status' => 4 ] ], //财务 成交报告-已结单
'backOutToOne' => [ 'index/Finance/backOutToOne', [ 'method' => 'POST' ]], //财务 成交报告-撤销成交报告
'backOutToOne' => [ 'index/Finance/backOutToOne', [ 'method' => 'POST' ] ], //财务 成交报告-撤销成交报告
'backOutOne/:check_status' => [ 'index/Finance/reportList', [ 'method' => 'get' ], [ 'check_status' => 5 ] ], //财务 成交报告-待撤销-第一级数据
'backOutTwo/:check_status' => [ 'index/Finance/reportList', [ 'method' => 'get' ], [ 'check_status' => 7 ] ], //财务 成交报告-待撤销-第二级数据
'backOutThree/:check_status' => [ 'index/Finance/reportList', [ 'method' => 'get' ], [ 'check_status' => 8 ] ], //财务 成交报告-待撤销-第三级数据
......@@ -211,9 +211,9 @@ Route::group('index', [
'checkReportAttache/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 1 ] ], //审核成交报告-第一级审核
'checkReportManager/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 2 ] ], //审核成交报告-第二级审核
'checkReportMajordomo/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 3 ] ], //审核成交报告-第三级审核
'checkBackOutOne/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 1 ] ], //审核撤销成交报告-第一级审核
'checkBackOutTwo/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 2 ] ], //审核撤销成交报告-第二级审核
'checkBackOutThree/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 3 ] ], //审核撤销成交报告-第三级审核
'checkBackOutOne/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 1 ] ], //审核撤销成交报告-第一级审核
'checkBackOutTwo/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 2 ] ], //审核撤销成交报告-第二级审核
'checkBackOutThree/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 3 ] ], //审核撤销成交报告-第三级审核
'overRuleAttache/:check_status' => [ 'index/Finance/overRule', [ 'method' => 'post' ], [ 'check_status' => 0 ] ], //退款审核-驳回-专员审核
'overRuleManager/:check_status' => [ 'index/Finance/overRule', [ 'method' => 'post' ], [ 'check_status' => 1 ] ], //退款审核-驳回-经理审核
'overRuleMajordomo/:check_status' => [ 'index/Finance/overRule', [ 'method' => 'post' ], [ 'check_status' => 2 ] ], //退款审核-驳回-总监审核
......@@ -275,27 +275,24 @@ Route::group('index', [
'inspectionRecordList' => [ 'index/InspectionRecord/inspectionRecordList', [ 'method' => 'GET' ] ],//约带看记录liu
'realtimePerformance' => [ 'index/RealTimePerformance/realtimePerformanceList', [ 'method' => 'GET' ] ],//实时业绩liu
'shopinspectionLog' => [ 'index/ShopInspectionLog/shopinspectionLogList', [ 'method' => 'POST|GET' ] ],//商铺查看日志liu
'shopinspectionLogTest' => [ 'index/ShopInspectionLogTest/shopinspectionLogListTest', [ 'method' => 'POST|GET' ] ],//商铺查看日志测试liu
'performancesubsidiaryList' => [ 'index/PerformanceSubsidiary/performancesubsidiaryList', [ 'method' => 'POST|GET' ] ],//业绩明细liu
'myCollectionUserList' => [ 'index/myCollectionUser/myCollectionUserList', [ 'method' => 'POST|GET' ] ],//我收藏的客户liu
'myCollectionShopList' => [ 'index/myCollectionShop/myCollectionShopList', [ 'method' => 'POST|GET' ] ],//我收藏的客户liu
'shopinspectionLogTest' => [ 'index/ShopInspectionLogTest/shopinspectionLogListTest', [ 'method' => 'POST|GET' ] ],//商铺查看日志测试liu
'performancesubsidiaryList' => [ 'index/PerformanceSubsidiary/performancesubsidiaryList', [ 'method' => 'POST|GET' ] ],//业绩明细liu
'myCollectionUserList' => [ 'index/myCollectionUser/myCollectionUserList', [ 'method' => 'POST|GET' ] ],//我收藏的客户liu
'myCollectionShopList' => [ 'index/myCollectionShop/myCollectionShopList', [ 'method' => 'POST|GET' ] ],//我收藏的客户liu
'lookShopIndex' => [ 'index/LookShop/lookShopIndex', [ 'method' => 'GET' ] ],//商铺查看日志
'lookShopIndex' => [ 'index/LookShop/lookShopIndex', [ 'method' => 'GET' ] ],//商铺查看日志
'lookShopIndex' => [ 'index/LookShop/lookShopIndex', [ 'method' => 'GET' ] ],//商铺查看日志
'lookShopIndex' => [ 'index/LookShop/lookShopIndex', [ 'method' => 'GET' ] ],//商铺查看日志
'selectDistrictPerformance' => [ 'index/Performance/selectDistrictPerformance', [ 'method' => 'POST|GET' ] ], //区域业绩排行 朱伟 2018-07-31
'selectStorePerformance' => [ 'index/Performance/selectStorePerformance', [ 'method' => 'POST|GET' ] ], //门店业绩排行 朱伟 2018-07-31
'selectIndividualPerformance' => [ 'index/Performance/selectIndividualPerformance', [ 'method' => 'POST|GET' ] ], //个人业绩排行 朱伟 2018-07-31
'transformFollowUp' => [ 'index/HouseFollowUp/transformFollowUp', [ 'method' => 'GET' ] ], //个人业绩排行 朱伟 2018-07-31
'getPerformanceExcel' => [ 'index/Performance/getPerformanceExcel', [ 'method' => 'POST|GET' ] ],
'selectDistrictPerformance' => [ 'index/Performance/selectDistrictPerformance', [ 'method' => 'POST|GET' ] ], //区域业绩排行 朱伟 2018-07-31
'selectStorePerformance' => [ 'index/Performance/selectStorePerformance', [ 'method' => 'POST|GET' ] ], //门店业绩排行 朱伟 2018-07-31
'selectIndividualPerformance' => [ 'index/Performance/selectIndividualPerformance', [ 'method' => 'POST|GET' ] ], //个人业绩排行 朱伟 2018-07-31
'transformFollowUp' => [ 'index/HouseFollowUp/transformFollowUp', [ 'method' => 'GET' ] ], //个人业绩排行 朱伟 2018-07-31
'getPerformanceExcel' => [ 'index/Performance/getPerformanceExcel', [ 'method' => 'POST|GET' ] ],
]);
......@@ -332,9 +329,9 @@ Route::group('api', [
'uploadHeadImg' => [ 'api/member/uploadHeadImg', [ 'method' => 'post' ] ], //头像上传
// shop
'getShopList' => [ 'api/shop/getShopList', [ 'method' => 'get|post' ] ],
'getShopList' => [ 'api/shop/getShopList', [ 'method' => 'get|post' ] ],
'filtrateCondition' => [ 'api/shop/filtrateCondition', [ 'method' => 'get | post' ] ],
'getShopDetail' => [ 'api/shop/getShopDetail', [ 'method' => 'get|post' ] ],
'getShopDetail' => [ 'api/shop/getShopDetail', [ 'method' => 'get|post' ] ],
'getMarchInList' => [ 'api/shop/getMarchInList', [ 'method' => 'get|post' ] ],
//get banner
......@@ -411,9 +408,10 @@ Route::group('task', [
'saveLookShop' => [ 'task/SaveLookShopHistoryTask/saveLookShop', [ 'method' => 'get' ] ], //保存看铺记录
'totalAgentResults_new' => [ 'task/ResultsSummaryTask/totalAgentResults', [ 'method' => 'get' ] ], //业绩统计
'totalAgentResults' => [ 'task/ResultsSummaryNewTask/totalAgentResults', [ 'method' => 'get' ] ], //业绩统计
'updateTotalByAgentId' => [ 'task/ResultsSummaryNewTask/updateTotalByAgentId', [ 'method' => 'get' ] ], //业绩统计
'totalAgentResults_new' => [ 'task/ResultsSummaryTask/totalAgentResults', [ 'method' => 'get' ] ], //业绩统计
'totalAgentResults' => [ 'task/ResultsSummaryNewTask/totalAgentResults', [ 'method' => 'get' ] ], //业绩统计
'totalAgentResultsByTime' => [ 'task/ResultsSummaryNewTask/totalAgentResultsByTime', [ 'method' => 'get' ] ], //业绩统计
'updateTotalByAgentId' => [ 'task/ResultsSummaryNewTask/updateTotalByAgentId', [ 'method' => 'get' ] ], //业绩统计
'rongBilledInformUrl' => [ 'task/PrivacyNumber/rongBilledInformUrl', [ 'method' => 'post | get' ] ],//隐私号码回调[话单通知]
......@@ -534,20 +532,20 @@ Route::group('broker', [
'userFollowUpList' => [ 'api_broker/HomePageLog/userFollowUpList', [ 'method' => 'post' ] ],
'houseFollowUpList' => [ 'api_broker/HomePageLog/houseFollowUpList', [ 'method' => 'post' ] ],
'housingResource' => [ 'api_broker/Performance/housingResource', [ 'method' => 'POST|GET' ] ], //获取房源list
'userResource' => [ 'api_broker/Performance/userResource', [ 'method' => 'POST|GET' ] ], //获取客源list
'followList' => [ 'api_broker/Performance/followList', [ 'method' => 'POST|GET' ] ], //报备list
'marchInList' => [ 'api_broker/Performance/marchInList', [ 'method' => 'POST|GET' ] ], //进场list
'paylogList' => [ 'api_broker/Performance/paylogList', [ 'method' => 'POST|GET' ] ], //收款list
'performanceList' => [ 'api_broker/Performance/performanceList', [ 'method' => 'POST|GET' ] ], //业绩list
'superviseList' => [ 'api_broker/Performance/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行list
'officialReceiptsList' => [ 'api_broker/Performance/officialReceiptsList', [ 'method' => 'POST|GET' ] ], //实收list
'housingResource' => [ 'api_broker/Performance/housingResource', [ 'method' => 'POST|GET' ] ], //获取房源list
'userResource' => [ 'api_broker/Performance/userResource', [ 'method' => 'POST|GET' ] ], //获取客源list
'followList' => [ 'api_broker/Performance/followList', [ 'method' => 'POST|GET' ] ], //报备list
'marchInList' => [ 'api_broker/Performance/marchInList', [ 'method' => 'POST|GET' ] ], //进场list
'paylogList' => [ 'api_broker/Performance/paylogList', [ 'method' => 'POST|GET' ] ], //收款list
'performanceList' => [ 'api_broker/Performance/performanceList', [ 'method' => 'POST|GET' ] ], //业绩list
'superviseList' => [ 'api_broker/Performance/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行list
'officialReceiptsList' => [ 'api_broker/Performance/officialReceiptsList', [ 'method' => 'POST|GET' ] ], //实收list
//user
'returnSearchCondition' => [ 'api_broker/User/returnSearchCondition', [ 'method' => 'get' ] ], //客户搜索条件
'searchUser' => [ 'api_broker/User/searchUser', [ 'method' => 'get|post' ] ], //客户搜索
'getLastOrNextUserID' => [ 'api_broker/User/getLastOrNextUserID', [ 'method' => 'get|post' ] ], //
'getLastOrNextUserIDPhoneFollowPu' => [ 'api_broker/User/getLastOrNextUserIDPhoneFollowPu', [ 'method' => 'get|post' ] ], //
'returnSearchCondition' => [ 'api_broker/User/returnSearchCondition', [ 'method' => 'get' ] ], //客户搜索条件
'searchUser' => [ 'api_broker/User/searchUser', [ 'method' => 'get|post' ] ], //客户搜索
'getLastOrNextUserID' => [ 'api_broker/User/getLastOrNextUserID', [ 'method' => 'get|post' ] ], //
'getLastOrNextUserIDPhoneFollowPu' => [ 'api_broker/User/getLastOrNextUserIDPhoneFollowPu', [ 'method' => 'get|post' ] ], //
'superviseListNew' => [ 'api_broker/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-15
'addSupervise' => [ 'api_broker/Supervise/addSupervise', [ 'method' => 'POST|GET' ] ], //新增-监督执行 朱伟 2018-06-20
......
......@@ -12,6 +12,7 @@ use app\model\OPayLogModel;
use app\model\OReportModel;
use app\model\TAgentTotalModel;
use app\model\Users;
use Think\Log;
/**
* Created by PhpStorm.
......@@ -79,6 +80,31 @@ class ResultsSummaryNewTask
unset($this->payLogModel);
}
public function totalAgentResultsByTime()
{
set_time_limit(0); // 取消脚本运行时间的超时上限
$total_time = $_GET["total_time"];
$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);
}
/**
......@@ -87,15 +113,15 @@ class ResultsSummaryNewTask
* @param $district_id
* @param $total_time string 比如修改了数据如成交报告,成交报告提交时间是昨天那么这里的时间就是昨天
*/
public function updateTotalByAgentId($agent_id,$store_id,$district_id,$total_time)
public function updateTotalByAgentId($agent_id, $store_id, $district_id, $total_time)
{
$params[0]["id"] = $agent_id;
$params[0]["store_id"] = $store_id;
$params[0]["district_id"] = $district_id;
/* $params[0]["id"] = 5439;
$params[0]["store_id"] = 92;
$params[0]["district_id"] = 2;
$total_time = '2018-08-15';*/
/* $params[0]["id"] = 5439;
$params[0]["store_id"] = 92;
$params[0]["district_id"] = 2;
$total_time = '2018-08-15';*/
$this->executeTotal($params, $total_time);
}
......@@ -123,10 +149,12 @@ class ResultsSummaryNewTask
if (count($total_time_arr) > 0) {
$id = $total_time_arr[0]["id"];
}
$agent_id = empty($value["id"]) ? 0 : $value["id"];
$district_id = empty($value["district_id"]) ? 0 : $value["district_id"];
$store_id = empty($value["store_id"]) ? 0 : $value["store_id"];
if (empty($value["id"]) || empty($value["district_id"]) || empty($value["store_id"])) {
continue;
}
$agent_id = $value["id"];
$district_id = $value["district_id"];
$store_id = $value["store_id"];
//todo 查询时间段的数据
$result = $this->selectTotal($agent_id, $district_id, $store_id, $start_total_time, $end_total_time);
......@@ -142,7 +170,6 @@ class ResultsSummaryNewTask
unset($result);
}
if (count($insertArr) > 0) {
$this->tAgentTotalModel->addTotal($insertArr);
}
......
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