Merge pull request '优化重算' (#203) from feature/finance_payment_20210115 into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/203
master
廖金灵 4 years ago
commit d47668b419

@ -1016,7 +1016,11 @@ class CompanyStatementController extends ThinkController
// if(in_array($v['verify_status'],[3,4])) continue; //合作方确认后不进行重算
//重算
if ($v['withdraw_type']!=3) {
if(IS_SUBSITE){
$res = A("SubCompanyStatementSet")->updateCompanyStatementData($v['id'],$this->admininfo["username"]);
}else{
$res = A("CompanyStatementSet")->updateCompanyStatementData($v['id'],$this->admininfo["username"]);
}
if($res === false){
$this->ajaxReturn(array(
'status' => 0,

@ -277,7 +277,6 @@ class SubCompanyStatementSetController extends Controller {
$add_data['verify_log'] = $verify_log;
$add_data['op_time'] =time();
$add_data['statement_info'] = json_encode($add_data['statement_info'],JSON_UNESCAPED_UNICODE);
//添加
if($recount && $company_id !== false){
//非重算
@ -324,13 +323,17 @@ class SubCompanyStatementSetController extends Controller {
$cplList = [];
foreach ($gameList as $k => $v) {
if($v['pay_money'] <= 0) continue; //0值不发送
//兼容旧数据的上游结算
$hasOtherName = false;
if(empty($v['original_package_name'])){
$game_name = $v['game_name'];
}else{
if($v['select_package_name'] == 0){
$game_name = $v['original_package_name'];
$hasOtherName = $v['game_name'];
}else{
$game_name = $v['game_name'];
$hasOtherName = $v['original_package_name'];
}
}
$cp_id = $v['cp_id'];
@ -339,6 +342,12 @@ class SubCompanyStatementSetController extends Controller {
$cplList[$cp_id]['list'][$game_name]["pay_money"] =$ymoney+$v["pay_money"];
$cplList[$cp_id]['list'][$game_name]["platform_money"] = $cplList[$cp_id]['list'][$game_name]["pay_money"];
$cplList[$cp_id]['list'][$game_name]["aggregate_money"] = 0;
//兼容旧数据结算,旧数据有可能不使用原包名结算
if($hasOtherName !== false){
$cplList[$cp_id]['list'][$hasOtherName]["pay_money"] = $cplList[$cp_id]['list'][$game_name]["pay_money"];
$cplList[$cp_id]['list'][$hasOtherName]["platform_money"] = $cplList[$cp_id]['list'][$game_name]["platform_money"];
$cplList[$cp_id]['list'][$hasOtherName]["aggregate_money"] = $cplList[$cp_id]['list'][$game_name]["aggregate_money"];
}
}
return $cplList;
}

Loading…
Cancel
Save