|
|
|
@ -1388,6 +1388,29 @@ class FinanceController extends ThinkController
|
|
|
|
|
$cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$testOrderData = M('test_order', 'tab_')
|
|
|
|
|
->where([
|
|
|
|
|
'pay_way'=>['egt',1],
|
|
|
|
|
'pay_time'=>$time
|
|
|
|
|
])
|
|
|
|
|
->field('pay_way,sum(pay_amount) as pay_amount')
|
|
|
|
|
->group("pay_way")
|
|
|
|
|
->select();
|
|
|
|
|
foreach ($testOrderData as $key => $value) {
|
|
|
|
|
|
|
|
|
|
if ($value['pay_way'] == NULL&&$value['pay_amount'] == NULL) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!array_key_exists($value['pay_way'], $cashStatistics)) {
|
|
|
|
|
$cashStatistics[$value['pay_way']] = $value;
|
|
|
|
|
$cashStatistics[$value['pay_way']]['pay_type'] = getPayType($value['pay_way']);//充值方式文字影视
|
|
|
|
|
$cashStatistics[$value['pay_way']]['pay_amount'] = '0.00';
|
|
|
|
|
$cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值
|
|
|
|
|
}
|
|
|
|
|
$cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach ($cashStatistics as $key => $value) {
|
|
|
|
|
$cashStatistics[$key]['pay_rate'] = '';
|
|
|
|
|
$cashStatistics[$key]['total'] = $value['pay_amount'] + $value['balance'];//添加列表合计
|
|
|
|
|