Merge pull request 'feature/add_item' (#331) from feature/add_item into release

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/331
master
郑永星 4 years ago
commit b603435c8f

@ -44,6 +44,8 @@ class CompanySystemRatioController extends AdminController
$handleData = $this->getCpGameRatio($handleData);
$data = $this->handleRatio($handleData);
$checkData = $handleData;
// dump($data);die();
$gameData = M("game","tab_")->field("original_package_name,relation_game_name game_name,game_type_name,relation_game_id game_id")
@ -131,8 +133,43 @@ class CompanySystemRatioController extends AdminController
('<').
($end);
} else {
$data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk]['turnover']=
'月流水='.$vvv['turnover'];
if ($vvv['instanceof'] != 1) {
foreach ($this->checkRatio as $ck => $cv) {
// if($v['game_id'] == 187) {
//
// dump($checkData[$v['game_id']][$cv]);
// dump($vvv);
// }
foreach ($checkData[$v['game_id']][$cv] as $gk=> $gv){
// if($cv == 2){
// dump($gv);
// dump($vvv['turnover']);
// die();
if($gv['turnover'] < $vvv['turnover']) {
$checkInstanceof = array_column($checkData[$v['game_id']][$cv],'instanceof');
// if($v['game_id'] == 187 && $cv == 2) {
// dump($checkData[$v['game_id']][$cv]);
// dump($vvv['turnover']);
// dump(in_array(3,$checkInstanceof));
// }
// in_array($checkInstanceof,2);
// die();
if (in_array(2,$checkInstanceof)) {
$data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk][$cv] = $gv['ratio'];
}
} else {
break;
}
// }
}
}
}
$data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk]['turnover']=
'月流水='.$vvv['turnover'];
}
}
@ -142,6 +179,7 @@ class CompanySystemRatioController extends AdminController
}
}
}
// die();
if ($_REQUEST['export']) {
$this->assign("is_export",true);
@ -191,13 +229,16 @@ class CompanySystemRatioController extends AdminController
//将比例整合
function handleRatio($handleData = []) {
$finalData = [];
// dump($handleData);die();
foreach ($handleData as $key => $value) {
foreach ($value as $vk => $vv) {
foreach ($vv as $k => $v) {
if ($finalData[$key][$v['turnover']]) {
$finalData[$key][$v['turnover']][$vk] = $v["ratio"];
// if($v["instanceof"] != 0 && ($vk==0||$vk==1||$vk==2) && $handleData[$key][$vk][$k-1]["ratio"]) {
// $finalData[$key][$v['turnover']][$vk] = $handleData[$key][$vk][$k-1]["ratio"];
// }
//判断是否有相同值且一个是>=另一个是>的情况
if ($finalData[$key][$v['turnover']]["instanceof"] != $v["instanceof"]) {
$finalData[$key][$v['turnover']]["instanceof"] = 0;
@ -224,7 +265,7 @@ class CompanySystemRatioController extends AdminController
}
// dump($finalData);
// dump($finalData);die();
$data = [];
foreach ($finalData as $key => $value) {

Loading…
Cancel
Save