Merge remote-tracking branch 'origin/fix/fiancecount_gamename_change' into fix/fiancecount_gamename_change

master
zhengyongxing 5 years ago
commit a7838bb552

@ -894,6 +894,9 @@ function clearGameNameType($game_name)
//设备名称词典 //设备名称词典
function getGameTypeName($id,$chinese=true) function getGameTypeName($id,$chinese=true)
{ {
if(empty($id)){
return '无';
}
$android = 'Android'; $android = 'Android';
$ios = 'ios'; $ios = 'ios';
if($chinese){ if($chinese){

@ -461,6 +461,10 @@ class FinancePromoteController extends AdminController
$value['sdk_version'] =getGameTypeName($value['sdk_version']); $value['sdk_version'] =getGameTypeName($value['sdk_version']);
if(!$value['game_name']) $value['game_name'] = "无"; if(!$value['game_name']) $value['game_name'] = "无";
//按类型判断pid
if($_REQUEST['promote_type'] == 2 && $_REQUEST['promote_id']){
$value['p_id'] = $_REQUEST['promote_id'];
}
} }
if (isset($_REQUEST['export'])) { if (isset($_REQUEST['export'])) {
@ -1013,6 +1017,7 @@ class FinancePromoteController extends AdminController
} }
$_POST['promote_level'] = $level; $_POST['promote_level'] = $level;
// } // }
// dd($map);
} }

@ -175,7 +175,7 @@ class PayChannelController extends ThinkController
$bindRechargeData['pay_amount'] = $bindRechargeData['pay_amount']?$bindRechargeData['pay_amount']:0; $bindRechargeData['pay_amount'] = $bindRechargeData['pay_amount']?$bindRechargeData['pay_amount']:0;
$offcialData['sum'] = $offcialData['pay_amount']+$bindRechargeData['pay_amount']; $offcialData['sum'] = $offcialData['pay_amount']+$bindRechargeData['pay_amount'];
$offcialData['pay_amount'] = $offcialData['pay_amount']+$bindRechargeData['pay_amount']-$offcialData['test_coin']; $offcialData['pay_amount'] = number_format($offcialData['pay_amount']+$bindRechargeData['pay_amount']-$offcialData['test_coin'],2,'.','');
$this->assign('offcialData',$offcialData); $this->assign('offcialData',$offcialData);
@ -187,8 +187,8 @@ class PayChannelController extends ThinkController
->field("0 as game_name,sum(pay_amount) as pay_amount,0 as platform_coin,id as test_coin") ->field("0 as game_name,sum(pay_amount) as pay_amount,0 as platform_coin,id as test_coin")
->where($spreadMap) ->where($spreadMap)
->find(); ->find();
$spreadData['pay_amount'] = $spreadData['pay_amount']?$spreadData['pay_amount']:0; $spreadData['pay_amount'] = $spreadData['pay_amount']?number_format($spreadData['pay_amount'],2,'.',''):'0.00';
$spreadData['sum'] = $spreadData['pay_amount']; $spreadData['sum'] = number_format($spreadData['pay_amount'],2,'.','');
$this->assign('spreadData',$spreadData); $this->assign('spreadData',$spreadData);
@ -238,6 +238,8 @@ class PayChannelController extends ThinkController
// $channelData[$testOrderChannelData['pay_way']]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.',''); // $channelData[$testOrderChannelData['pay_way']]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.','');
$testorderChannelArr[$trkey]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.',''); $testorderChannelArr[$trkey]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.','');
$testorderChannelArr[$trkey]['pay_way'] = get_pay_way($testOrderChannelData['pay_way']); $testorderChannelArr[$trkey]['pay_way'] = get_pay_way($testOrderChannelData['pay_way']);
$channelData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.','');
$channelData[$key]['pay_way'] = get_pay_way($value['pay_way']);
} }
else { else {
$channelData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.',''); $channelData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.','');
@ -281,24 +283,23 @@ class PayChannelController extends ThinkController
} }
//汇总计算 //汇总计算
$sumData['pay_amount'] += $value['pay_amount'] - $value['test_coin']; $sumData['pay_amount'] += number_format($value['pay_amount'] - $value['test_coin'],2,'.','');
$sumData['platform_coin'] += $handleCoinData[$value['game_id']]?$handleCoinData[$value['game_id']]:0; $sumData['platform_coin'] += $handleCoinData[$value['game_id']]?number_format($handleCoinData[$value['game_id']],2,'.',''):0;
$sumData['test_coin'] += $handleTestData[$value['game_id']]?$handleTestData[$value['game_id']]:0; $sumData['test_coin'] += $handleTestData[$value['game_id']]?number_format($handleTestData[$value['game_id']],2,'.',''):0;
$sumData['test_platform_coin'] +=$handleTestCoinData[$value['game_id']]?$handleTestCoinData[$value['game_id']]:0; $sumData['test_platform_coin'] +=$handleTestCoinData[$value['game_id']]?number_format($handleTestCoinData[$value['game_id']],2,'.',''):0;
} }
// 汇总数据 // 汇总数据
if ($_REQUEST['game_id']) { if ($_REQUEST['game_id']) {
$sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin']; $sumData['platform_coin'] = number_format($sumData['platform_coin'] - $sumData['test_platform_coin'],2,'.','');
$sumData['test_coin'] = $sumData['test_coin']+$sumData['test_platform_coin']; $sumData['test_coin'] = number_format($sumData['test_coin']+$sumData['test_platform_coin'],2,'.','');
$sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin']; $sumData['sum'] = number_format($sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin'],2,'.','');
} else { } else {
$sumData['pay_amount'] = $sumData['pay_amount'] + $superSignData['pay_amount'] + $bindRechargeData['pay_amount']; $sumData['pay_amount'] = number_format($sumData['pay_amount'] + $superSignData['pay_amount'] + $bindRechargeData['pay_amount'],2,'.','');
$sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin'] + $sumData['platform_coin'] = number_format($sumData['platform_coin'] - $sumData['test_platform_coin'] + $offcialData['pay_amount'] + $spreadData['pay_amount'],2,'.','');
$offcialData['pay_amount'] + $spreadData['pay_amount']; $sumData['test_coin'] = number_format($sumData['test_coin']+$offcialTestCost+$testSuperSignCost+$sumData['test_platform_coin'],2,'.','');
$sumData['test_coin'] = $sumData['test_coin']+$offcialTestCost+$testSuperSignCost+$sumData['test_platform_coin']; $sumData['sum'] = number_format($sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin'],2,'.','');
$sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin']; $coinSum = number_format($coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost,2,'.','');
$coinSum = $coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost;
} }
$sum_pay_amount = M('test_order', 'tab_')->where($maptestorder)->field('sum(pay_amount) as sum_order_amount')->find(); $sum_pay_amount = M('test_order', 'tab_')->where($maptestorder)->field('sum(pay_amount) as sum_order_amount')->find();
@ -343,7 +344,18 @@ class PayChannelController extends ThinkController
} }
$payTypeDataExport['sdk_version'] .= "平台币直充总金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计)". $payTypeDataExport['sdk_version'] .= "平台币直充总金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计)".
($coinSum); ($coinSum);
if ($sum_platform_pay_amount['sum_order_amount'] != 0) {
$testOrderDataExport['pay_amount'] = $sum_noplatform_pay_amount['sum_order_amount'];
}else {
$testOrderDataExport['pay_amount'] = '0.00';
}
if ($sum_noplatform_pay_amount['sum_order_amount'] != 0) {
$testOrderDataExport['platform_coin'] = $sum_platform_pay_amount['sum_order_amount'];
}else {
$testOrderDataExport['platform_coin'] = '0.00';
}
$testOrderDataExport['test_coin'] = '0.00';
$testOrderDataExport['sum'] = '0.00';
$channelDataExport['game_name'] = '支付渠道'; $channelDataExport['game_name'] = '支付渠道';
$channelDataExport2['game_name'] = '支付渠道占比'; $channelDataExport2['game_name'] = '支付渠道占比';
foreach($channelData as $key => $value) { foreach($channelData as $key => $value) {
@ -388,7 +400,8 @@ class PayChannelController extends ThinkController
$this->assign('listdata',$data); $this->assign('listdata',$data);
//统计总额和比例 //统计总额和比例
$this->assign('channelData2',$channelData); $this->assign('channelData2',$channelData);
$this->assign('sum_pay_amount',$sum_pay_amount); $this->assign('sum_platform_pay_amount',$sum_platform_pay_amount);
$this->assign('sum_noplatform_pay_amount',$sum_noplatform_pay_amount);
$moneyAllCount = array_sum(array_column($channelData, 'pay_amount')); $moneyAllCount = array_sum(array_column($channelData, 'pay_amount'));
$this->assign('moneyAllCount',$moneyAllCount); $this->assign('moneyAllCount',$moneyAllCount);
$this->display(); $this->display();
@ -880,7 +893,7 @@ class PayChannelController extends ThinkController
foreach ($xlsData as $k => $v) { foreach ($xlsData as $k => $v) {
if ($model == 'spend') { if ($model == 'spend') {
$v['game_name'] =clearGameNameType($v['game_name']); $v['game_name'] =clearGameNameType($v['game_name']);
$v['sdk_version'] =getGameTypeName($v[$key]['sdk_version']); $v['sdk_version'] =getGameTypeName($v['sdk_version']);
} }
$v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']); $v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']);
$v['pay_way'] = get_pay_way($v['pay_way']); $v['pay_way'] = get_pay_way($v['pay_way']);

@ -238,6 +238,11 @@
<if condition="$data['p_id'] GT 0"> <if condition="$data['p_id'] GT 0">
<a href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.'),['p'=>1]))}">渠道查看</a> <a href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.'),['p'=>1]))}">渠道查看</a>
</if> </if>
<!-- <a
href="{:U('FinancePromote/gameStatistics',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id'],'promote_type'=>1],I('get.'),['p'=>1]))}">游戏查看</a>
<if condition="$data['p_id'] GT 0">
<a href="{:U('FinancePromote/promoteUser',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id']],I('get.'),['p'=>1]))}">渠道查看</a>
</if> -->
</td> </td>
</tr> </tr>
</volist> </volist>

Loading…
Cancel
Save