|
|
|
@ -1563,14 +1563,22 @@ class TimingController extends AdminController {
|
|
|
|
|
|
|
|
|
|
echo date("Y-m-d H:i:s")."----------------------商务奖金计算----------------------\n";
|
|
|
|
|
|
|
|
|
|
list($becomeTimeList,$becomeTimeCount) = $this->getAffairList(date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01')));
|
|
|
|
|
|
|
|
|
|
dump($becomeTimeList);
|
|
|
|
|
dump($becomeTimeCount);die();
|
|
|
|
|
|
|
|
|
|
$time1 = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'));
|
|
|
|
|
$time2 = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-02'));
|
|
|
|
|
$time3 = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-03'));
|
|
|
|
|
if (!$_REQUEST['time']) {
|
|
|
|
|
$time = time();
|
|
|
|
|
} else {
|
|
|
|
|
$time = strtotime($_REQUEST['time']);
|
|
|
|
|
|
|
|
|
|
$time = strtotime(date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)+1).'-01')));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list($becomeTimeList,$becomeTimeCount) = $this->getAffairList(date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)-1).'-01')));
|
|
|
|
|
|
|
|
|
|
$time1 = date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)-1).'-01'));
|
|
|
|
|
$time2 = date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)-2).'-01'));
|
|
|
|
|
$time3 = date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)-3).'-01'));
|
|
|
|
|
|
|
|
|
|
$lasttime = [$time2,$time3];
|
|
|
|
|
|
|
|
|
@ -1602,6 +1610,8 @@ class TimingController extends AdminController {
|
|
|
|
|
->field("sum(pay_amount) pay_amount")
|
|
|
|
|
->where(['time'=>$time1])
|
|
|
|
|
->find()['pay_amount'];
|
|
|
|
|
//判断是不是初次
|
|
|
|
|
$is_hav = M("business_affairs_award_pool","tab_")->where("time = {$time2}")->find();
|
|
|
|
|
|
|
|
|
|
foreach ($data as $key => $value){
|
|
|
|
|
|
|
|
|
@ -1611,11 +1621,14 @@ class TimingController extends AdminController {
|
|
|
|
|
|
|
|
|
|
$value['quarter_bonus_pool'] = $this->businessAffairRatio($value['pay_amount']);
|
|
|
|
|
|
|
|
|
|
for($i = (($value['month']%3)?(($value['month']%3)-1):2); $i == 0; $i--) {
|
|
|
|
|
$value['quarter_bonus_pool'] +=
|
|
|
|
|
$this->businessAffairRatio($handleData[$value['year'].'-'.(($value['month']-$i)>0?($value['month']-$i):($value['month']-$i+12)).$value['game_belong_id'].$value['relation_game_id']]['pay_amount']);
|
|
|
|
|
if ($is_hav) {
|
|
|
|
|
for($i = (($value['month']%3)?(($value['month']%3)-1):2); $i > 0; $i--) {
|
|
|
|
|
$value['quarter_bonus_pool'] +=
|
|
|
|
|
$this->businessAffairRatio($handleData[$value['year'].'-'.(($value['month']-$i)>0?($value['month']-$i):($value['month']-$i+12)).$value['game_belong_id'].$value['relation_game_id']]['pay_amount']);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unset($value['year']);
|
|
|
|
|
unset($value['month']);
|
|
|
|
|
|
|
|
|
|