优化经理绩效统计

master
chenzhi 3 years ago
parent 50b491d490
commit e61df7adc4

@ -523,10 +523,11 @@ class MarketPerformanceSetController extends Controller {
$baseData['nickname'] = $v['nickname'];
$baseData['admin_id'] = $v['uid'];
$this->marketAltogetherModel->add($baseData);
$res = $this->marketAltogetherModel->add($baseData);
echo "marketManagerSet {$v['real_name']}/{$res}".PHP_EOL;
}
echo "marketManagerSet ok".PHP_EOL;
}
}

@ -888,11 +888,6 @@ class TimingController extends AdminController {
$pay_time = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'));
$map['pay_time'] = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'));
}
//经理计算
A("MarketPerformanceSet")->marketManagerSet($pay_time);
// $this->createMarketBonus($_REQUEST['time']);
// dump(date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01')));die();
if ($pay_time == 'all') {
@ -907,7 +902,6 @@ class TimingController extends AdminController {
} while ($date < date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01')));
$map['pay_time'] = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'));;
// unset($map['pay_time']);
} else{
SM("market_altogether","tab_")->where(['pay_time'=>$pay_time])->delete();
$this->insertAllUserBonus($pay_time);
@ -955,9 +949,6 @@ class TimingController extends AdminController {
$market_percentage['maintain_commission_ratio'] = 0;
$market_percentage['maintain_appraisal_bonuses_ratio'] = 0;
}
// echo "{$value['nickname']}:{$value['pay_time']}\n";
// dump($market_percentage);
$settleup_marketorder = SM("settleup_marketorder","tab_")
->where(['admin_id'=>$value['admin_id'],'pay_time'=>$value['pay_time'],'is_settlement'=>1])
->select();
@ -1037,7 +1028,6 @@ class TimingController extends AdminController {
$insert['achievement_profit'] = number_format($all_data[$key]['achievement_profit'], 2, '.', '');
$insert['performance_profit'] = number_format($all_data[$key]['performance_profit'], 2, '.', '');
// $insert['wait_commission'] = ($insert['wait_performance_commission']+$insert['wait_achievement_commission']);
$is_hav = SM("market_altogether","tab_")
->where(['admin_id'=>$value['admin_id'],'pay_time'=>$value['pay_time']])
->find();
@ -1052,6 +1042,9 @@ class TimingController extends AdminController {
}
//经理计算
A("MarketPerformanceSet")->marketManagerSet($pay_time);
}
public function sendMarketBonus(){

Loading…
Cancel
Save