|
|
@ -24,16 +24,16 @@ class SubCompanyStatementSetController extends Controller {
|
|
|
|
echo "请先设置请求接口aggregate_cp_settlement_api的值".PHP_EOL;die;
|
|
|
|
echo "请先设置请求接口aggregate_cp_settlement_api的值".PHP_EOL;die;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->cpapihost = $cpapihost['value'];
|
|
|
|
$this->cpapihost = $cpapihost['value'];
|
|
|
|
$this->synGame();
|
|
|
|
// $this->synGame();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//同步游戏表
|
|
|
|
//同步游戏表
|
|
|
|
protected function synGame()
|
|
|
|
// protected function synGame()
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
$mainGame = M("Game","tab_")->select();
|
|
|
|
// $mainGame = M("Game","tab_")->select();
|
|
|
|
SM()->execute("truncate table tab_game");
|
|
|
|
// SM()->execute("truncate table tab_game");
|
|
|
|
M("game","tab_",SUBSITE_DB)->addAll($mainGame);
|
|
|
|
// M("game","tab_",SUBSITE_DB)->addAll($mainGame);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Undocumented function
|
|
|
|
* Undocumented function
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -258,7 +258,6 @@ class SubCompanyStatementSetController extends Controller {
|
|
|
|
$statement_begin_time = date("Y.m.d",$begintime);
|
|
|
|
$statement_begin_time = date("Y.m.d",$begintime);
|
|
|
|
$statement_end_time = date("Y.m.d",$endtime);
|
|
|
|
$statement_end_time = date("Y.m.d",$endtime);
|
|
|
|
$MainStatementDb = M("CompanyStatement","tab_"); //主站结算单
|
|
|
|
$MainStatementDb = M("CompanyStatement","tab_"); //主站结算单
|
|
|
|
// dd($cpList);
|
|
|
|
|
|
|
|
foreach($cpList as $k=>$v){
|
|
|
|
foreach($cpList as $k=>$v){
|
|
|
|
//
|
|
|
|
//
|
|
|
|
$sub_company_id = ($v['first_company_type'] == 1 ? $v['first_company_id'] : $v['second_company_id']);
|
|
|
|
$sub_company_id = ($v['first_company_type'] == 1 ? $v['first_company_id'] : $v['second_company_id']);
|
|
|
@ -277,10 +276,13 @@ class SubCompanyStatementSetController extends Controller {
|
|
|
|
if(isset($v['list'][$igm])){
|
|
|
|
if(isset($v['list'][$igm])){
|
|
|
|
$add_data['statement_info'][$index]['platform_money'] = $v['list'][$igm]['platform_money'];
|
|
|
|
$add_data['statement_info'][$index]['platform_money'] = $v['list'][$igm]['platform_money'];
|
|
|
|
$add_data['statement_info'][$index]['aggregate_money'] = $v['list'][$igm]['aggregate_money'];
|
|
|
|
$add_data['statement_info'][$index]['aggregate_money'] = $v['list'][$igm]['aggregate_money'];
|
|
|
|
$add_data['statement_info'][$index]['ratio'] = $add_data['statement_info'][$index][$ratio_str];
|
|
|
|
$game_pay_amount = $v['list'][$igm]['platform_money']-0+$v['list'][$igm]['aggregate_money'];
|
|
|
|
|
|
|
|
$ratio = getGameCpRadio($item['relation_game_id'], $game_pay_amount, true) - 0;
|
|
|
|
|
|
|
|
$add_data['statement_info'][$index]['ratio'] = $ratio;
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
$add_data['statement_info'][$index]['platform_money'] = 0;
|
|
|
|
$add_data['statement_info'][$index]['platform_money'] = 0;
|
|
|
|
$add_data['statement_info'][$index]['aggregate_money'] = 0;
|
|
|
|
$add_data['statement_info'][$index]['aggregate_money'] = 0;
|
|
|
|
|
|
|
|
$add_data['statement_info'][$index]['ratio'] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
unset($add_data['id'],$add_data['remark'],$add_data['confirm_status'],$add_data['confirm_log']);
|
|
|
|
unset($add_data['id'],$add_data['remark'],$add_data['confirm_status'],$add_data['confirm_log']);
|
|
|
|