From 6ce7377dc14ccf7c597ae519cd75f2d544f372e4 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 29 Oct 2020 20:11:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=A5=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementSetController.class.php | 92 +++++++++---------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index bfad9f77e..6b5138afc 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -1456,10 +1456,12 @@ class CompanyStatementSetController extends Controller { "statement_info"=>json_encode($v['statement_info'],JSON_UNESCAPED_UNICODE) ]; } + //无需补点不统计其他金额 + if($type == 2 && $v['statement_money'] == 0){ + continue ; + } //聚合未结算数据 $lsres = $LackStatement->where("company_id='{$k}' and is_pool = 0")->select(); - // dd($lsres); - $del_lack_ids = []; if(count($lsres) > 0){ //进行聚合 @@ -1492,52 +1494,48 @@ class CompanyStatementSetController extends Controller { if($v['platform_amount'] == 0 && $v['statement_money'] == 0){ continue ; } - if($type == 2 && $v['statement_money'] == 0){ - //补点不存 + if($v['platform_amount'] < 300){ + //存未满 + // if($lackcompany['pay_amount'] != 0){ + $lask_id = $LackStatement->add($lackcompany); + $countdata['create_lack_ids'][] =$lask_id; + $countdata['lack_statement_money'] +=$lackcompany['statement_money']; + $countdata['lack_platform_amount'] +=$lackcompany['platform_amount']; + // } + }else{ - if($v['platform_amount'] < 300){ - //存未满 - // if($lackcompany['pay_amount'] != 0){ - $lask_id = $LackStatement->add($lackcompany); - $countdata['create_lack_ids'][] =$lask_id; - $countdata['lack_statement_money'] +=$lackcompany['statement_money']; - $countdata['lack_platform_amount'] +=$lackcompany['platform_amount']; - // } - - }else{ - // if($v['pay_amount'] != 0){ - //存成功配置单号 - $company =[ - "pool_id"=>0, - "company_id"=>$k, - "company_type"=>2, - "company_name"=>$v['partner'], - "company_info"=>json_encode($company_info,JSON_UNESCAPED_UNICODE), - "statement_money"=>$v['statement_money'], - "pay_amount"=>$v['pay_amount'], - "platform_amount"=>$v['platform_amount'], - "fine"=>$v['fine'], - "reward"=>$v['reward'], - "statement_begin_time"=>$begintime, - "statement_end_time"=>$endtime, - "statement_info"=>json_encode($v['statement_info'],JSON_UNESCAPED_UNICODE), - "statement_num"=>"JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5) - ]; - if($v['is_payment'] == 1){ - $company['verify_status'] = 0; - }else{ - $company['verify_status'] = 2; - } - $companyid = $StatementInfo->add($company); - $countdata['info_ids'][] =$companyid; - $countdata['del_lack_ids'] =array_merge($countdata['del_lack_ids'],$del_lack_ids); - $countdata['statement_money'] +=$v['statement_money']; - $countdata['pay_amount'] +=$v['pay_amount']; - $countdata['platform_amount'] +=$v['platform_amount']; - $countdata['fine'] +=$v['fine']; - $countdata['reward'] +=$v['reward']; - // } - } + // if($v['pay_amount'] != 0){ + //存成功配置单号 + $company =[ + "pool_id"=>0, + "company_id"=>$k, + "company_type"=>2, + "company_name"=>$v['partner'], + "company_info"=>json_encode($company_info,JSON_UNESCAPED_UNICODE), + "statement_money"=>$v['statement_money'], + "pay_amount"=>$v['pay_amount'], + "platform_amount"=>$v['platform_amount'], + "fine"=>$v['fine'], + "reward"=>$v['reward'], + "statement_begin_time"=>$begintime, + "statement_end_time"=>$endtime, + "statement_info"=>json_encode($v['statement_info'],JSON_UNESCAPED_UNICODE), + "statement_num"=>"JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5) + ]; + if($v['is_payment'] == 1){ + $company['verify_status'] = 0; + }else{ + $company['verify_status'] = 2; + } + $companyid = $StatementInfo->add($company); + $countdata['info_ids'][] =$companyid; + $countdata['del_lack_ids'] =array_merge($countdata['del_lack_ids'],$del_lack_ids); + $countdata['statement_money'] +=$v['statement_money']; + $countdata['pay_amount'] +=$v['pay_amount']; + $countdata['platform_amount'] +=$v['platform_amount']; + $countdata['fine'] +=$v['fine']; + $countdata['reward'] +=$v['reward']; + // } } } }