From da8cd1e984d3b42170a13f73e40f3ce2179c4cfb Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 18 May 2021 14:28:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanySystemRatioController.class.php | 29 ++++++++++++++++--- .../Admin/View/CompanySystemRatio/export.html | 14 ++++----- .../Admin/View/CompanySystemRatio/index.html | 14 ++++----- 3 files changed, 39 insertions(+), 18 deletions(-) diff --git a/Application/Admin/Controller/CompanySystemRatioController.class.php b/Application/Admin/Controller/CompanySystemRatioController.class.php index 770247c2d..c30ac750f 100644 --- a/Application/Admin/Controller/CompanySystemRatioController.class.php +++ b/Application/Admin/Controller/CompanySystemRatioController.class.php @@ -90,7 +90,7 @@ class CompanySystemRatioController extends AdminController $data[] = $handleData; } - +// dump($data);die(); foreach ($data as $key => $value) { foreach ($value['data'] as $k => $v) { @@ -116,13 +116,23 @@ class CompanySystemRatioController extends AdminController } else { if ($vvv['is_equal'] != 1) { + + if (($data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk+1]['turnover'] == $vvv['turnover'] && !$data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk+2]['turnover']) + ||!($data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk+1]['turnover'])) { + $end = '∞'; + } elseif($data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk+1]['turnover'] == $vvv['turnover'] && $data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk+2]['turnover']) { + $end = $data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk+2]['turnover']; + } else { + $end = $data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk+1]['turnover']; + } + $data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk]['turnover'] = $vvv['turnover'].($vvv['instanceof']==1?'<=':'<').'月流水'. ('<'). - ($data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk+1]['turnover']??'∞'); + ($end); } else { - $data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk]['turnover']= - '月流水='.$vvv['turnover']; + $data[$key]['data'][$k]['game_data'][$vk]['ratio_data'][$vvk]['turnover']= + '月流水='.$vvv['turnover']; } } @@ -223,12 +233,23 @@ class CompanySystemRatioController extends AdminController $finalData[$key][$k][$cv] = $data[$key][count($data[$key])-1][$cv]; } } +// dump($finalData[$key]); + $data[$key][] = $finalData[$key][$k]; } } + foreach ($data as $key => $value) { + + $last_names = array_column($data[$key],'turnover'); + array_multisort($last_names,SORT_ASC,$data[$key]); + + } +// dump($data); + + return $data; } diff --git a/Application/Admin/View/CompanySystemRatio/export.html b/Application/Admin/View/CompanySystemRatio/export.html index 5ee4274ca..5f36a76ce 100644 --- a/Application/Admin/View/CompanySystemRatio/export.html +++ b/Application/Admin/View/CompanySystemRatio/export.html @@ -125,10 +125,10 @@ {$data['data'][0]['original_package_name']|default='无'} {$data['data'][0]['game_data'][0]['game_name']|default='无'} {$data['data'][0]['game_data'][0]['ratio_data'][0]['turnover']|default='无阶梯'} + {$data['data'][0]['game_data'][0]['ratio_data'][0][3]|default='0.00'}% {$data['data'][0]['game_data'][0]['ratio_data'][0][0]|default='0.00'}% {$data['data'][0]['game_data'][0]['ratio_data'][0][1]|default='0.00'}% {$data['data'][0]['game_data'][0]['ratio_data'][0][2]|default='0.00'}% - {$data['data'][0]['game_data'][0]['ratio_data'][0][3]|default='0.00'}% {$data['data'][0]['game_data'][0]['ratio_data'][0][4]|default='0.00'}% @@ -136,10 +136,10 @@ {$ratio_data['turnover']|default='无阶梯'} + {$ratio_data[3]|default='0.00'}% {$ratio_data[0]|default='0.00'}% {$ratio_data[1]|default='0.00'}% {$ratio_data[2]|default='0.00'}% - {$ratio_data[3]|default='0.00'}% {$ratio_data[4]|default='0.00'}% @@ -154,10 +154,10 @@ {$game_data_other['turnover']|default='无阶梯'} + {$game_data_other['3']|default='0.00'}% {$game_data_other['0']|default='0.00'}% {$game_data_other['1']|default='0.00'}% {$game_data_other['2']|default='0.00'}% - {$game_data_other['3']|default='0.00'}% {$game_data_other['4']|default='0.00'}% @@ -172,10 +172,10 @@ {$sun_data['original_package_name']|default='无'} {$sun_data['game_data'][0]['game_name']|default='无'} {$sun_data['game_data'][0]['ratio_data'][0]['turnover']|default='无阶梯'} + {$sun_data['game_data'][0]['ratio_data'][0]['3']|default='0.00'}% {$sun_data['game_data'][0]['ratio_data'][0]['0']|default='0.00'}% {$sun_data['game_data'][0]['ratio_data'][0]['1']|default='0.00'}% {$sun_data['game_data'][0]['ratio_data'][0]['2']|default='0.00'}% - {$sun_data['game_data'][0]['ratio_data'][0]['3']|default='0.00'}% {$sun_data['game_data'][0]['ratio_data'][0]['4']|default='0.00'}% @@ -186,10 +186,10 @@ {$game_datas['turnover']|default='无阶梯'} + {$game_datas['3']|default='0.00'}% {$game_datas['0']|default='0.00'}% {$game_datas['1']|default='0.00'}% {$game_datas['2']|default='0.00'}% - {$game_datas['3']|default='0.00'}% {$game_datas['4']|default='0.00'}% @@ -202,20 +202,20 @@ {$game_datas['game_name']|default='无'} {$game_datas['ratio_data'][0]['turnover']|default='无阶梯'} + {$game_datas['ratio_data'][0][3]|default='0.00'}% {$game_datas['ratio_data'][0][0]|default='0.00'}% {$game_datas['ratio_data'][0][1]|default='0.00'}% {$game_datas['ratio_data'][0][2]|default='0.00'}% - {$game_datas['ratio_data'][0][3]|default='0.00'}% {$game_datas['ratio_data'][0][4]|default='0.00'}% {$game_data_others['turnover']|default='无阶梯'} + {$game_data_others['3']|default='0.00'}% {$game_data_others['0']|default='0.00'}% {$game_data_others['1']|default='0.00'}% {$game_data_others['2']|default='0.00'}% - {$game_data_others['3']|default='0.00'}% {$game_data_others['4']|default='0.00'}% diff --git a/Application/Admin/View/CompanySystemRatio/index.html b/Application/Admin/View/CompanySystemRatio/index.html index d1f40e518..63e48a787 100644 --- a/Application/Admin/View/CompanySystemRatio/index.html +++ b/Application/Admin/View/CompanySystemRatio/index.html @@ -142,10 +142,10 @@ {$data['data'][0]['original_package_name']|default='无'} {$data['data'][0]['game_data'][0]['game_name']|default='无'} {$data['data'][0]['game_data'][0]['ratio_data'][0]['turnover']|default='无阶梯'} + {$data['data'][0]['game_data'][0]['ratio_data'][0][3]|default='0.00'}% {$data['data'][0]['game_data'][0]['ratio_data'][0][0]|default='0.00'}% {$data['data'][0]['game_data'][0]['ratio_data'][0][1]|default='0.00'}% {$data['data'][0]['game_data'][0]['ratio_data'][0][2]|default='0.00'}% - {$data['data'][0]['game_data'][0]['ratio_data'][0][3]|default='0.00'}% {$data['data'][0]['game_data'][0]['ratio_data'][0][4]|default='0.00'}% @@ -153,10 +153,10 @@ {$ratio_data['turnover']|default='无阶梯'} + {$ratio_data[3]|default='0.00'}% {$ratio_data[0]|default='0.00'}% {$ratio_data[1]|default='0.00'}% {$ratio_data[2]|default='0.00'}% - {$ratio_data[3]|default='0.00'}% {$ratio_data[4]|default='0.00'}% @@ -171,10 +171,10 @@ {$game_data_other['turnover']|default='无阶梯'} + {$game_data_other['3']|default='0.00'}% {$game_data_other['0']|default='0.00'}% {$game_data_other['1']|default='0.00'}% {$game_data_other['2']|default='0.00'}% - {$game_data_other['3']|default='0.00'}% {$game_data_other['4']|default='0.00'}% @@ -189,10 +189,10 @@ {$sun_data['original_package_name']|default='无'} {$sun_data['game_data'][0]['game_name']|default='无'} {$sun_data['game_data'][0]['ratio_data'][0]['turnover']|default='无阶梯'} + {$sun_data['game_data'][0]['ratio_data'][0]['3']|default='0.00'}% {$sun_data['game_data'][0]['ratio_data'][0]['0']|default='0.00'}% {$sun_data['game_data'][0]['ratio_data'][0]['1']|default='0.00'}% {$sun_data['game_data'][0]['ratio_data'][0]['2']|default='0.00'}% - {$sun_data['game_data'][0]['ratio_data'][0]['3']|default='0.00'}% {$sun_data['game_data'][0]['ratio_data'][0]['4']|default='0.00'}% @@ -203,10 +203,10 @@ {$game_datas['turnover']|default='无阶梯'} + {$game_datas['3']|default='0.00'}% {$game_datas['0']|default='0.00'}% {$game_datas['1']|default='0.00'}% {$game_datas['2']|default='0.00'}% - {$game_datas['3']|default='0.00'}% {$game_datas['4']|default='0.00'}% @@ -219,20 +219,20 @@ {$game_datas['game_name']|default='无'} {$game_datas['ratio_data'][0]['turnover']|default='无阶梯'} + {$game_datas['ratio_data'][0][3]|default='0.00'}% {$game_datas['ratio_data'][0][0]|default='0.00'}% {$game_datas['ratio_data'][0][1]|default='0.00'}% {$game_datas['ratio_data'][0][2]|default='0.00'}% - {$game_datas['ratio_data'][0][3]|default='0.00'}% {$game_datas['ratio_data'][0][4]|default='0.00'}% {$game_data_others['turnover']|default='无阶梯'} + {$game_data_others['3']|default='0.00'}% {$game_data_others['0']|default='0.00'}% {$game_data_others['1']|default='0.00'}% {$game_data_others['2']|default='0.00'}% - {$game_data_others['3']|default='0.00'}% {$game_data_others['4']|default='0.00'}%