Merge branch 'feature/platfrom_aggregate_finance' of wmtx/platform into release

优化补点计算方式
master
廖金灵 4 years ago committed by Gogs
commit d6271796b1

@ -2159,6 +2159,7 @@ function getGamePromoteCompanyRadio($company_id,$relation_game_id,$endtime,$amou
//判断是否有生效 //判断是否有生效
$rwhere = "(end_time = 0 OR end_time >= '{$endtime}') and company_id='{$company_id}' and relation_game_id='{$relation_game_id}'"; $rwhere = "(end_time = 0 OR end_time >= '{$endtime}') and company_id='{$company_id}' and relation_game_id='{$relation_game_id}'";
$cgr_res = M("CompanyGameRatio","tab_")->where($rwhere)->find(); $cgr_res = M("CompanyGameRatio","tab_")->where($rwhere)->find();
// dump( M("CompanyGameRatio","tab_")->where($rwhere)->select(false));
if(empty($cgr_res)){ if(empty($cgr_res)){
//模板搜索 //模板搜索
//获取公司类型 //获取公司类型

@ -48,7 +48,7 @@ class CompanyStatementSetController extends Controller {
public function setDailyCount($stime="now") public function setDailyCount($stime="now")
{ {
if(!IS_CLI){ if(!IS_CLI){
// die("只支持脚本访问"); die("只支持脚本访问");
} }
if($stime=="now"){ if($stime=="now"){
$stime=time(); $stime=time();
@ -263,6 +263,7 @@ class CompanyStatementSetController extends Controller {
$tratio1 = getGameCpRadio($game_id['id'],$va['pay_money'],true); $tratio1 = getGameCpRadio($game_id['id'],$va['pay_money'],true);
$tratio2 = getGameCpRadio($game_id['id'],$va['pay_money'],false); $tratio2 = getGameCpRadio($game_id['id'],$va['pay_money'],false);
$tratio = $tratio1-$tratio2; $tratio = $tratio1-$tratio2;
if($tratio <= 0){continue;}
} }
} }
@ -475,7 +476,7 @@ class CompanyStatementSetController extends Controller {
$add_data=[]; $add_data=[];
//1.获取甲乙方信息 //1.获取甲乙方信息
if($v['first_company_type'] == 1){ if($v['first_company_type'] > 0){
//甲方合作 //甲方合作
$pc[$v['first_company_id']]['invoice_type'] = $v['invoice_type']; $pc[$v['first_company_id']]['invoice_type'] = $v['invoice_type'];
$pc[$v['first_company_id']]['invoice_content'] = $v['invoice_content']; $pc[$v['first_company_id']]['invoice_content'] = $v['invoice_content'];
@ -528,6 +529,7 @@ class CompanyStatementSetController extends Controller {
$tratio1 = getGamePromoteCompanyRadio($add_data['company_id'],$va['relation_game_id'],$endtime,$va['pay_amount'],true,$company_belong);; $tratio1 = getGamePromoteCompanyRadio($add_data['company_id'],$va['relation_game_id'],$endtime,$va['pay_amount'],true,$company_belong);;
$tratio2 = getGamePromoteCompanyRadio($add_data['company_id'],$va['relation_game_id'],$endtime,$va['pay_amount'],false,$company_belong); $tratio2 = getGamePromoteCompanyRadio($add_data['company_id'],$va['relation_game_id'],$endtime,$va['pay_amount'],false,$company_belong);
$tratio = $tratio1-$tratio2; $tratio = $tratio1-$tratio2;
if($tratio <= 0){ continue;}
} }
if($v['type'] == 2){ if($v['type'] == 2){
@ -766,17 +768,19 @@ class CompanyStatementSetController extends Controller {
$game['game_type_name'] = $this->getGameTypeName($va['relation_game_id']); $game['game_type_name'] = $this->getGameTypeName($va['relation_game_id']);
if($type == 1){ if($type == 1){
$tratio = getGamePromoteCompanyRadio($add_data['company_id'],$va['relation_game_id'],$endtime,$va['pay_amount'],true,$company_belong); $tratio = getGamePromoteCompanyRadio($v['id'],$va['relation_game_id'],$endtime,$va['pay_amount'],true,$company_belong);
}elseif($type == 0){ }elseif($type == 0){
$tratio = getGamePromoteCompanyRadio($add_data['company_id'],$va['relation_game_id'],$endtime,$va['pay_amount'],false,$company_belong); $tratio = getGamePromoteCompanyRadio($v['id'],$va['relation_game_id'],$endtime,$va['pay_amount'],false,$company_belong);
}else{ }else{
//补点 //补点
$tratio1 = getGamePromoteCompanyRadio($add_data['company_id'],$va['relation_game_id'],$endtime,$va['pay_amount'],true,$company_belong);; $tratio1 = getGamePromoteCompanyRadio($v['id'],$va['relation_game_id'],$endtime,$va['pay_amount'],true,$company_belong);;
$tratio2 = getGamePromoteCompanyRadio($add_data['company_id'],$va['relation_game_id'],$endtime,$va['pay_amount'],false,$company_belong); $tratio2 = getGamePromoteCompanyRadio($v['id'],$va['relation_game_id'],$endtime,$va['pay_amount'],false,$company_belong);
$tratio = $tratio1-$tratio2; $tratio = $tratio1-$tratio2;
if($tratio <= 0){
continue;
}
} }
if($type == 2){
if($v['type'] == 2){
$game['increment_ratio']=$tratio; $game['increment_ratio']=$tratio;
}else{ }else{
$game['ratio']=$tratio; $game['ratio']=$tratio;

@ -57,7 +57,7 @@
<div class="cf main-place top_nav_list navtab_list"> <div class="cf main-place top_nav_list navtab_list">
<div class="fr"> <div class="fr">
<a href="{:U('index')}">生效列表</a> <a href="{:U('index')}">生效列表</a>
<a class="tabchose" href="{:U('list')}">审核列表</a> <a class="tabchose" href="{:U('lists')}">审核列表</a>
</div> </div>
<h3 class="page_title">公司绑定审核列表</h3> <h3 class="page_title">公司绑定审核列表</h3>
<p class="description_text"></p> <p class="description_text"></p>

Loading…
Cancel
Save