优化工会统计各级检索条件结束

master
chenzhi 5 years ago
parent 0561d8ff15
commit 1295857697

@ -281,19 +281,11 @@ class FinancePromoteController extends AdminController
$senddata[$v['promote_id']] = $v; $senddata[$v['promote_id']] = $v;
}; };
} }
if(!empty($senddata)){
if(array_key_exists(0,$senddata) || $_REQUEST['promote_id']==0){
$pmap['status']=1;
if($istimeselect){
$pmap['create_time'] = $istimeselect;
}
$admininside = M("provide_user p","tab_")->field("sum(amount) amount")->where($pmap)->find();
if($admininside['amount'] >0){
$senddata[0]['inside_cash_count']= $admininside['amount'];
}
if(array_key_exists(0,$senddata)){
unset($senddata[0]);
} }
}
$count = count($senddata); $count = count($senddata);
if ($_REQUEST['data_order'] != '') { if ($_REQUEST['data_order'] != '') {
$data_order = reset(explode(',', $_REQUEST['data_order'])); $data_order = reset(explode(',', $_REQUEST['data_order']));
@ -366,6 +358,7 @@ class FinancePromoteController extends AdminController
$map['s.pay_time']=$istimeselect; $map['s.pay_time']=$istimeselect;
} }
$map['s.pay_status']=1; $map['s.pay_status']=1;
// dd($map);
$field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count, $field= "SUM(CASE WHEN pay_way > 0 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 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 THEN pay_amount ELSE 0 END) as bind_coin_count,
@ -946,6 +939,7 @@ class FinancePromoteController extends AdminController
} }
} }
} }
// dd($map);
$_POST['promote_level'] = $level; $_POST['promote_level'] = $level;
} }

@ -78,7 +78,7 @@
<div class="cf main-place top_nav_list navtab_list"> <div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$title}</h3> <h3 class="page_title">{$title}</h3>
<p class="description_text">说明:渠道相关统计</p> <p class="description_text">说明:渠道相关统计/不含官方渠道</p>
</div> </div>
<style> <style>

Loading…
Cancel
Save