Merge branch 'dev_zyx' into dev

master
zhengchanglong 5 years ago
commit 3da91ecb0f

@ -5658,17 +5658,20 @@ if ($key == 'model'){
->where($map) ->where($map)
->group('promote_id') ->group('promote_id')
->select(); ->select();
if (empty(I("root_name"))) {
$xlsData = array_merge($parentData,$xlsData); $xlsData = array_merge($parentData, $xlsData);
}
$sumData = M('spend_user_count','tab_') $sumData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count') ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map) ->where($map)
->find(); ->find();
$sumData['cash_count'] = number_format($sumData['cash_count']+$parentData[0]['cash_count'],2,'.',''); if (empty(I("root_name"))) {
$sumData['balance_coin_count'] = number_format($sumData['balance_coin_count']+$parentData[0]['balance_coin_count'],2,'.',''); $sumData['cash_count'] = number_format($sumData['cash_count'] + $parentData[0]['cash_count'], 2, '.', '');
$sumData['inside_cash_count'] = number_format($sumData['inside_cash_count']+$parentData[0]['inside_cash_count'],2,'.',''); $sumData['balance_coin_count'] = number_format($sumData['balance_coin_count'] + $parentData[0]['balance_coin_count'], 2, '.', '');
$sumData['all_count'] = number_format($sumData['all_count']+$parentData[0]['all_count'],2,'.',''); $sumData['inside_cash_count'] = number_format($sumData['inside_cash_count'] + $parentData[0]['inside_cash_count'], 2, '.', '');
$sumData['all_count'] = number_format($sumData['all_count'] + $parentData[0]['all_count'], 2, '.', '');
}
$sumData = [['promote_account'=>'总计', $sumData = [['promote_account'=>'总计',
'cash_count'=>$sumData['cash_count'], 'cash_count'=>$sumData['cash_count'],

@ -400,17 +400,20 @@ class FinanceController extends ThinkController
->group('promote_id') ->group('promote_id')
->page($page,$row) ->page($page,$row)
->select(); ->select();
if (empty(I("root_name"))) {
$subQueryAll = array_merge($parentData,$subQueryAll); $subQueryAll = array_merge($parentData,$subQueryAll);
}
$sumData = M('spend_user_count','tab_') $sumData = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count') ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')
->where($map) ->where($map)
->find(); ->find();
$sumData['cash_count'] = number_format($sumData['cash_count']+$parentData[0]['cash_count'],2,'.',''); if (empty(I("root_name"))) {
$sumData['balance_coin_count'] = number_format($sumData['balance_coin_count']+$parentData[0]['balance_coin_count'],2,'.',''); $sumData['cash_count'] = number_format($sumData['cash_count'] + $parentData[0]['cash_count'], 2, '.', '');
$sumData['inside_cash_count'] = number_format($sumData['inside_cash_count']+$parentData[0]['inside_cash_count'],2,'.',''); $sumData['balance_coin_count'] = number_format($sumData['balance_coin_count'] + $parentData[0]['balance_coin_count'], 2, '.', '');
$sumData['all_count'] = number_format($sumData['all_count']+$parentData[0]['all_count'],2,'.',''); $sumData['inside_cash_count'] = number_format($sumData['inside_cash_count'] + $parentData[0]['inside_cash_count'], 2, '.', '');
$sumData['all_count'] = number_format($sumData['all_count'] + $parentData[0]['all_count'], 2, '.', '');
}
$count = M('spend_user_count','tab_') $count = M('spend_user_count','tab_')
->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count') ->field('promote_id,promote_account,sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count, sum(all_count) as all_count')

Loading…
Cancel
Save