Merge pull request '工会统计bug修改' (#136) from feature/add_item into release

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/136
master
郑永星 4 years ago
commit 2dd945613f

@ -378,11 +378,11 @@ class FinancePromoteController extends AdminController
$map['s.market_admin_id'] = $adminId; $map['s.market_admin_id'] = $adminId;
} }
$map['s.pay_status']=1; $map['s.pay_status']=1;
$map['s.is_check']=1; // $map['s.is_check']=1;
D("Spend")->addSubsiteWhere($map,"s"); D("Spend")->addSubsiteWhere($map,"s");
$field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count, $field= "SUM(CASE WHEN pay_way > 0 and s.is_check=1 THEN pay_amount ELSE 0 END) as cash_count,
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count, SUM(CASE WHEN pay_way = 0 and s.is_check=1 THEN pay_amount ELSE 0 END) as balance_coin_count,
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as bind_coin_count, SUM(CASE WHEN pay_way = -1 and s.is_check=1 THEN pay_amount ELSE 0 END) as bind_coin_count,
IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) p_id, IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) p_id,
IFNULL(company_id,0) company_id,company_name,develop_type,IFNULL(promote.company_belong,0) company_belong"; IFNULL(company_id,0) company_id,company_name,develop_type,IFNULL(promote.company_belong,0) company_belong";
$query = M() $query = M()

Loading…
Cancel
Save