新增外团分发和其他团统计

master
chenzhi 5 years ago
parent 2fe965749e
commit cbbbcfd8ff

@ -12,8 +12,10 @@ class FinancialSummaryController extends AdminController
"fine_count"=>"违规处罚",
"inside_count"=>"内团",
"outer_count"=>"外团",
"inside_count"=>"内团",
"outer_count"=>"外团",
"outer_branch_count"=>"外团-分发",
"other_group_count"=>"无归属团",
// "inside_count"=>"内团",
// "outer_count"=>"外团",
"gfwx_count"=>"官方-微信",
"gfzfb_count"=>"官方-支付宝",
"sqzfb_count"=>"双乾-支付宝",

@ -253,14 +253,28 @@ class FinancialSummarySetController extends \Think\Controller
->join("tab_promote promote ON s.promote_id = promote.id", "left")
->group("company_belong")
->select();
$inside_count = 0;
$outer_count = 0;
$inside_count = 0;//内团
$outer_count = 0;//外团
$outer_branch_count = 0;//外团分发
$other_group_count = 0;//其他
$inside_nobind_count = 0;
$outer_nobind_count = 0;
$outer_branch_nobind_count = 0;
$other_group_nobind_count = 0;//其他
foreach ($res as $k => $v) {
if($v['company_belong'] == 1){
$outer_count = $v['cash_count']*100+$v['balance_coin_count']*100+$v['bind_coin_count']*100;
$outer_nobind_count = $v['cash_count']*100+$v['balance_coin_count']*100;
}elseif($v['company_belong'] == 2){
//外团分发
$outer_branch_count = $v['cash_count']*100+$v['balance_coin_count']*100+$v['bind_coin_count']*100;
$outer_branch_nobind_count = $v['cash_count']*100+$v['balance_coin_count']*100;
}elseif($v['company_belong'] == 3){
//其他
$other_group_count = $v['cash_count']*100+$v['balance_coin_count']*100+$v['bind_coin_count']*100;
$other_group_nobind_count = $v['cash_count']*100+$v['balance_coin_count']*100;
}else{
//有可能存在官方渠道company_belong=null
$inside_count += ($v['cash_count']*100+$v['balance_coin_count']*100+$v['bind_coin_count']*100);
@ -278,6 +292,17 @@ class FinancialSummarySetController extends \Think\Controller
"type"=>2,"sort"=>2,
"sum_money"=>number_format($outer_count/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'outer_branch_count',
"type"=>2,"sort"=>3,
"sum_money"=>number_format($outer_branch_count/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'other_group_count',
"type"=>2,"sort"=>4,
"sum_money"=>number_format($other_group_count/100, 2, '.', '')
);
//不含绑定币
$this->adddata[] = array(
"key_name"=>'inside_count',
"type"=>3,"sort"=>1,
@ -288,6 +313,16 @@ class FinancialSummarySetController extends \Think\Controller
"type"=>3,"sort"=>2,
"sum_money"=>number_format($outer_nobind_count/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'outer_branch_count',
"type"=>3,"sort"=>3,
"sum_money"=>number_format($outer_branch_nobind_count/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'other_group_count',
"type"=>3,"sort"=>4,
"sum_money"=>number_format($other_group_nobind_count/100, 2, '.', '')
);
}
/**
* 获取类型为4,5的数据/按支付渠道类型,支付类型类型

Loading…
Cancel
Save