From 4526b5b741da5ecb0949ca687a3e5208895de475 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 13 Nov 2020 14:17:38 +0800 Subject: [PATCH 01/53] =?UTF-8?q?11=E6=9C=88=E5=8A=9F=E8=83=BD=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 20 + ...regateFinanceStatementController.class.php | 38 ++ .../CompanyGameRatioController.class.php | 8 +- .../CompanyStatementPoolController.class.php | 145 ++++- .../PromoteCompanyController.class.php | 40 +- .../Admin/View/CompanyGameRatio/addRatio.html | 19 +- .../Admin/View/CompanyGameRatio/edit.html | 7 + .../View/CompanyGameRatio/editRatio.html | 7 + .../View/CompanyStatementPool/editPuPool.html | 28 +- .../editSpecialPuPool.html | 557 ++++++++++++++++++ .../View/CompanyStatementPool/lists.html | 41 +- .../View/CompanyStatementPool/viewPuPool.html | 6 + .../Admin/View/PromoteCompany/export.html | 217 ++++--- .../Admin/View/PromoteCompany/lists.html | 135 +++-- Data/update.sql | 7 +- 15 files changed, 1090 insertions(+), 185 deletions(-) create mode 100644 Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 60c63486b..d435f65e4 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2236,6 +2236,26 @@ function excelDownStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_al $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+9), $data['receive_company']['bank_account']."\t");//银行账号 $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+10), $data['receive_company']['opening_bank']);//开户行 + $height = 20; + $font_size = 56; + + if (strlen($data['pay_company']['partner'])getActiveSheet()->getStyle("E".($line+3).":E".($line+10))->getAlignment()->setWrapText(true); + $objPHPExcel->getActiveSheet()->getStyle("B".($line+3).":B".($line+7))->getAlignment()->setWrapText(true); + $objPHPExcel->getActiveSheet()->getRowDimension(($line+3))->setRowHeight($height*$partner_height); + $objPHPExcel->getActiveSheet()->getRowDimension(($line+6))->setRowHeight($address_height*$height); + $objPHPExcel->getActiveSheet()->getRowDimension(($line+8))->setRowHeight($payee_name_height*$height); + $objPHPExcel->getActiveSheet()->getRowDimension(($line+10))->setRowHeight($opening_bank_height*$height); + $fileName = "{$data['company_name']}&{$data['my_company']}-对账单{$statement_begin_time}-{$statement_end_time}"; // dd($fileName); ob_end_clean();//清除缓冲区,避免乱码 diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 2e1c626b5..3a198d116 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -734,6 +734,25 @@ class AggregateFinanceStatementController extends ThinkController $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+5), $data['second_party_info']['link_phone']);//联系电话 $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+6), $data['second_party_info']['address']);//邮寄地址 + $height = 20; + $font_size = 56; + + if (strlen($data['second_party_info']['partner'])getActiveSheet()->getStyle("E".($line+3).":E".($line+6))->getAlignment()->setWrapText(true); + $objPHPExcel->getActiveSheet()->getStyle("B".($line+3).":B".($line+6))->getAlignment()->setWrapText(true); + $objPHPExcel->getActiveSheet()->getRowDimension(($line+3))->setRowHeight($height*$partner_height); + $objPHPExcel->getActiveSheet()->getRowDimension(($line+6))->setRowHeight($address_height*$height); + //开票信息 $invoice_data = "发票类型:".$data['pay_company']['invoice_type']; $invoice_data .= "\n发票抬头:".$data['pay_company']['partner']; @@ -831,6 +850,25 @@ class AggregateFinanceStatementController extends ThinkController $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+5), $data['second_party_info']['link_phone']);//联系电话 $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+6), $data['second_party_info']['address']);//邮寄地址 + $height = 20; + $font_size = 56; + + if (strlen($data['second_party_info']['partner'])getActiveSheet()->getStyle("E".($line+3).":E".($line+6))->getAlignment()->setWrapText(true); + $objPHPExcel->getActiveSheet()->getStyle("B".($line+3).":B".($line+6))->getAlignment()->setWrapText(true); + $objPHPExcel->getActiveSheet()->getRowDimension(($line+3))->setRowHeight($height*$partner_height); + $objPHPExcel->getActiveSheet()->getRowDimension(($line+6))->setRowHeight($address_height*$height); + //开票信息 // $invoice_data = "发票类型:".$data['second_party_info']['invoice_type']; // $invoice_data .= "\n发票抬头:".$data['second_party_info']['partner']; diff --git a/Application/Admin/Controller/CompanyGameRatioController.class.php b/Application/Admin/Controller/CompanyGameRatioController.class.php index 93ecebbc5..368bfc207 100644 --- a/Application/Admin/Controller/CompanyGameRatioController.class.php +++ b/Application/Admin/Controller/CompanyGameRatioController.class.php @@ -98,7 +98,7 @@ class CompanyGameRatioController extends AdminController $gameres = M("game","tab_")->field("tab_game.relation_game_id,tab_game.relation_game_name,IF(tab_game.original_package_name='','未配置',tab_game.original_package_name) original_package_name,tab_game_type.type_name game_type_name")->where($gamewhere)->join("tab_game_type on tab_game.game_type_id = tab_game_type.id")->group("tab_game.relation_game_id")->select(false); $dbres = M("company_game_ratio","tab_") ->alias('m') - ->field("m.*,g.*,p.company_name,p.company_belong,IFNULL(r.settlement_type,-1) settlement_type,group_concat(turnover_type ORDER BY begin_time ASC SEPARATOR '|') turnover_type,group_concat(ratio ORDER BY begin_time ASC SEPARATOR '|') ratio,group_concat(begin_time ORDER BY begin_time ASC SEPARATOR '|') begin_time,group_concat(end_time ORDER BY begin_time ASC SEPARATOR '|') end_time,group_concat(m.turnover_ratio ORDER BY begin_time ASC SEPARATOR '|') turnover_ratio,group_concat(m.id ORDER BY begin_time ASC SEPARATOR '|') operate_id") + ->field("m.*,g.*,p.company_name,m.company_belong,IFNULL(r.settlement_type,-1) settlement_type,group_concat(turnover_type ORDER BY begin_time ASC SEPARATOR '|') turnover_type,group_concat(ratio ORDER BY begin_time ASC SEPARATOR '|') ratio,group_concat(begin_time ORDER BY begin_time ASC SEPARATOR '|') begin_time,group_concat(end_time ORDER BY begin_time ASC SEPARATOR '|') end_time,group_concat(m.turnover_ratio ORDER BY begin_time ASC SEPARATOR '|') turnover_ratio,group_concat(m.id ORDER BY begin_time ASC SEPARATOR '|') operate_id") ->join("JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id") ->join("JOIN tab_promote_company p ON ( m.company_id = p.id".$pwhere.")") ->join("left JOIN tab_company_relation r ON (r.first_company_type =2 AND r.first_company_id = m.company_id) OR (r.second_company_type =2 AND r.second_company_id = m.company_id)"); @@ -590,6 +590,7 @@ class CompanyGameRatioController extends AdminController if (!isset($params['ratio']) || $params['ratio'] === '') { $this->error('默认分成比例不能为空'); } + $save['company_belong'] = $params['company_belong'] ?? 0; $save['turnover_ratio'] = $this->setTurnoverRatio($params); $save['ratio'] = $params['ratio'] ?? 0; $save['relation_game_id'] = $params['relation_game_id'] ?? 0; @@ -615,6 +616,7 @@ class CompanyGameRatioController extends AdminController //判断已有未审核 $where = [ + "company_belong"=>$save['company_belong'], "relation_game_id"=>$save['relation_game_id'], "company_id"=>$save['company_id'], "status"=>["LT",2],//管理员未确认 @@ -687,7 +689,7 @@ class CompanyGameRatioController extends AdminController $gameres = M("game","tab_")->field("tab_game.relation_game_id,tab_game.relation_game_name,IF(tab_game.original_package_name='','未配置',tab_game.original_package_name) original_package_name,tab_game_type.type_name game_type_name")->join("tab_game_type on tab_game.game_type_id = tab_game_type.id")->group("tab_game.relation_game_id")->select(false); $dbres = M("company_game_ratio","tab_") ->alias('m') - ->field("m.*,g.*,p.company_name,p.company_belong") + ->field("m.*,g.*,p.company_name,m.company_belong") ->join("left JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id") ->join("left JOIN tab_promote_company p ON m.company_id = p.id") ->where($map) @@ -754,7 +756,7 @@ class CompanyGameRatioController extends AdminController $gameres = M("game","tab_")->field("tab_game.relation_game_id,tab_game.relation_game_name,IF(tab_game.original_package_name='','未配置',tab_game.original_package_name) original_package_name,tab_game_type.type_name game_type_name")->join("tab_game_type on tab_game.game_type_id = tab_game_type.id")->group("tab_game.relation_game_id")->select(false); $dbres = M("company_game_ratio_log","tab_") ->alias('m') - ->field("m.*,g.*,p.company_name,p.company_belong") + ->field("m.*,g.*,p.company_name,m.company_belong") ->join("left JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id") ->join("left JOIN tab_promote_company p ON m.company_id = p.id") ->where($map) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index abe12876d..9c2cc7b82 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -31,7 +31,9 @@ class CompanyStatementPoolController extends ThinkController "2"=>"待打款", "3"=>"打款中", "4"=>"打款成功", - "5"=>"无需打款" + "5"=>"无需打款", + "6"=>"初审通过", + "-3"=>"初审拒绝", ]; public $InfoVerifyStatus=[ "-1"=>"配置信息不全", @@ -137,6 +139,19 @@ class CompanyStatementPoolController extends ThinkController $symbol = "
"; } $v["create"]= "{$v['verify_log']['create_user']} {$symbol} {$v['verify_log']['create_time']}"; + + if(isset($v['verify_log']['firstverify_user'])){ + if($v['verify_status'] == -3){ + $ts = "初审拒绝"; + }else{ + $ts = "初审通过"; + } + $v["firstverify"]= "{$ts}({$v['verify_log']['firstverify_user']}) {$symbol} {$v['verify_log']['firstverify_time']}"; + $ts = ''; + }else{ + $v["firstverify"] = '--'; + } + if(isset($v['verify_log']['verify_user'])){ if($v['verify_status'] == -1){ $ts = "审核拒绝"; @@ -247,8 +262,12 @@ class CompanyStatementPoolController extends ThinkController $this->assign("title",$statement_num); $this->assign("pool_status",$pool_info['verify_status']); $this->assign("is_payment",$pool_info['is_payment']); + if ($_REQUEST['type']) { + $this->editSpecialPuPool($infolist,$is_export); + } else { + $this->editPuPool($infolist,$is_export); + } - $this->editPuPool($infolist,$is_export); } public function editPuPool(&$infolist,$is_export) { @@ -344,6 +363,99 @@ class CompanyStatementPoolController extends ThinkController $this->display("CompanyStatementPool/editPuPool"); } + public function editSpecialPuPool(&$infolist,$is_export) { + $line = 1; + $count = []; + $week_line = 2; + //获取对接人 + foreach($infolist as $k=>&$v){ + $v['statement_info'] = json_decode($v['statement_info'],true); + $v['company_info'] = json_decode($v['company_info'],true); + $v['statement_begin_time'] = date('Y.m.d',$v['statement_begin_time']); + $v['statement_end_time'] = date('Y.m.d',$v['statement_end_time']); + if( isset($v['verify_status'])){ + if( $v['verify_status'] ==2 ){ + $v['is_payment'] = 2; //不打款 + }else{ + $v['is_payment'] = 1; + } + } + $cline = $line+1; + if($is_export){ + $v['statement_money'] = "=ROUND("; + } + + $row = 0; + foreach($v['statement_info'] as $ke=>&$va){ + $va['row'] = count($va['game_list']); + $row += count($va['game_list']); + + foreach($va['game_list'] as $key=>&$val){ + $line ++; + if($v['withdraw_type'] != 3) { +// if(!$val['ratio']&&!$val['increment_ratio']) { +// if(isset($val['ratio'])){ +// $val['increment_ratio'] = 0; +// }else{ +// $val['ratio'] = 0; +// } +// } + if (!$val['increment_ratio']) { + $val['increment_ratio'] = 0; + } + + if (!$val['ratio']) { + $val['ratio'] = 0; + } + + if (!$val['refund']) { + $val['refund'] = 0; + } +// if(isset($val['ratio'])){ +// $val['increment_ratio'] = 0; +// }else{ +// $val['ratio'] = 0; +// } + } + + if($is_export){ + if($v['withdraw_type'] != 3) { + $val['sum_money'] = "=ROUND((K{$line}-L{$line})*(M{$line}+N{$line}),2)"; + } else { + $val['sum_money'] = "=ROUND(K{$line}*(M{$line}),2)"; + } + $v['statement_money'] .= "N{$line}+"; + }else{ + $count['platform_amount'] += $val['pay_amount']; + $count['sum_money'] += $val['sum_money']; + } + } + } + + $handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line); + + $v['statement_info'] = $handle_data; + + $v['row'] = $row; + if($is_export){ + if($v['withdraw_type'] != 3) { + $v['statement_money'] .="O{$cline}-P{$cline},2)"; + } else { + $v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1).",2)"; + } + } + } + + if($is_export){ + $count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)"; + $count["sum_money"] = "=ROUND(SUM(Q2:Q".$line."),2)"; + } + $this->assign("data",$infolist); + $this->assign("count",$count); + $this->assign("is_export",$is_export); + $this->display("CompanyStatementPool/editSpecialPuPool"); + } + //个人汇总结算查看 public function viewPuPool(&$infolist,$is_export){ $line = 1; @@ -869,10 +981,18 @@ class CompanyStatementPoolController extends ThinkController //审批通过 public function verifyAgree(){ - $this->setVerifyStatus(0,1,"verify"); + $this->setVerifyStatus(6,1,"verify"); } public function verifyRefuse(){ - $this->setVerifyStatus(0,-1,"verify"); + $this->setVerifyStatus(6,-1,"verify"); + } + + //审批通过 + public function firstverifyAgree(){ + $this->setVerifyStatus(0,6,"firstverify"); + } + public function firstverifyRefuse(){ + $this->setVerifyStatus(0,-3,"firstverify"); } //审批撤回 public function verifyReturn() { @@ -1389,6 +1509,7 @@ class CompanyStatementPoolController extends ThinkController "viewPool"=>"查看", "editPool"=>"编辑", + "editSpecialPuPool"=>"编辑", "addRemark"=>"新增备注", "editRemark"=>"修改备注", @@ -1455,7 +1576,7 @@ class CompanyStatementPoolController extends ThinkController } if ($info['withdraw_type'] == "特殊补点") { - $optist = ['viewPool','cancelPool']; + $optist = ['viewPool','cancelPool','editSpecialPuPool']; } if($info['company_type'] == 2 && $info['verify_status'] == '0'&&$info['withdraw_type'] != "特殊补点") { @@ -1498,6 +1619,8 @@ class CompanyStatementPoolController extends ThinkController public function menuAuth() { $mentBtn = [ + "firstverifyAgree"=>"初审通过", + "firstverifyRefuse"=>"初审拒绝", "verifyAgree"=>"审批通过", "verifyRefuse"=>"审核拒绝", "verifyReturn"=>"审批撤回", @@ -1526,6 +1649,7 @@ class CompanyStatementPoolController extends ThinkController $ratio = $data['ratio']; $refund = $data['refund']; + $withhold = $data['withhold']; $increment_ratio = $data['increment_ratio']; $sum_money = $data['sum_money']; $st = $data['st']; @@ -1536,7 +1660,7 @@ class CompanyStatementPoolController extends ThinkController $statement_amount = 0; $statement_lack_amount = 0; - foreach ($ratio as $key => $value) { + foreach ($increment_ratio as $key => $value) { if ($st[$key] == 1) { $model = M("company_statement_info","tab_"); @@ -1552,10 +1676,14 @@ class CompanyStatementPoolController extends ThinkController $game_list = $v['game_list']; foreach ($game_list as $gk => $gv) { - - $statement_info[$k]['game_list'][$gk]['ratio'] = $ratio[$key][$v['account']][$gk]; + if ($ratio[$key][$v['account']][$gk]) { + $statement_info[$k]['game_list'][$gk]['ratio'] = $ratio[$key][$v['account']][$gk]; + } $statement_info[$k]['game_list'][$gk]['refund'] = $refund[$key][$v['account']][$gk]; + $statement_info[$k]['game_list'][$gk]['withhold'] = $withhold[$key][$v['account']][$gk]; + $statement_info[$k]['game_list'][$gk]['increment_ratio'] = $increment_ratio[$key][$v['account']][$gk]; + $statement_info[$k]['game_list'][$gk]['sum_money'] = $sum_money[$key][$v['account']][$gk]; $amount += $sum_money[$key][$v['account']][$gk]; @@ -1570,6 +1698,7 @@ class CompanyStatementPoolController extends ThinkController } } + $statement_info = json_encode($statement_info); $model->where(['id'=>$key])->save(['statement_info'=>$statement_info,'statement_money'=>$amount,'pay_amount'=>$amount,'remark'=>$remark[$key]]); diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 25e0b7c3f..7eabf5dd1 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -179,11 +179,20 @@ class PromoteCompanyController extends ThinkController $v["game_ids"] = $g_id; } $senddata = $this->getGamePromoteCompanyRadio($v["id"],$v["game_ids"],$is_export); + + foreach($senddata as $key => $value) { + $senddata[$key]['ratio_data'] = array_values($senddata[$key]['ratio_data']); + } +// dump($senddata); + } $game = $this->getPromoteGameRadio($v["id"],$senddata,$promotemap); $v += $game; +// dump($game); } } + +// die(); //公司及会长数量统计 $companycount = $model->field("id")->where($map)->select(); @@ -1301,6 +1310,7 @@ class PromoteCompanyController extends ThinkController */ protected function getGamePromoteCompanyRadio($company_id,$game_ids,$is_export = false){ $is_inside = M("PromoteCompany","tab_")->field("is_inside")->where("id='{$company_id}'")->find()['is_inside']; + //判断是否有生效 $senddata = []; $game = $this->getGameInfo($game_ids); @@ -1312,16 +1322,19 @@ class PromoteCompanyController extends ThinkController $endtime = time(); $rwhere = "(end_time = 0 OR end_time >= '{$endtime}') and company_id='{$company_id}' and relation_game_id in ({$game_ids})"; $cgr_res = M("CompanyGameRatio","tab_")->where($rwhere)->select(); + //判断哪些游戏为空 $game_arr = array_flip(explode(",",$game_ids)); if(!empty($cgr_res)){ foreach ($cgr_res as $k => $v) { $t_gid = $v['relation_game_id']; unset($game_arr[$t_gid]); - $senddata[$t_gid] = ["turnover_ratio"=>$v['turnover_ratio'],"ratio"=>!$is_inside?$v['ratio']:0,"relation_game_id"=>$v['relation_game_id']]; + $senddata[$t_gid]['ratio_data'][$v['begin_time']] = ["turnover_ratio"=>$v['turnover_ratio'],"ratio"=>!$is_inside?$v['ratio']:0,"relation_game_id"=>$v['relation_game_id'],'time'=>date("Y-m-d",$v['begin_time'])."-".($v['end_time']?date("Y-m-d",$v['end_time']):"永久")]; $senddata[$t_gid] += $game[$t_gid]; - $this->setPromoteRadio($senddata[$t_gid],$is_inside); + $this->setPromoteRadio($senddata[$t_gid]['ratio_data'][$v['begin_time']],$is_inside); + + $senddata[$t_gid]['row'] += $senddata[$t_gid]['ratio_data'][$v['begin_time']]['row']; if($is_export){ if(isset($CpRadio[$t_gid])){ @@ -1329,7 +1342,8 @@ class PromoteCompanyController extends ThinkController if( count($CpRadio[$t_gid]) >= $senddata[$t_gid]['row'] ){ $c = count($CpRadio[$t_gid]) - $senddata[$t_gid]['row']; for ($x=0; $x<$c; $x++) { - $senddata[$t_gid]['turnover_ratio'][]=["name"=>"--","ratio"=>"--"]; + $senddata[$t_gid]['ratio_data'][$v['begin_time']]['turnover_ratio'][]=["name"=>"--","ratio"=>"--"]; + $senddata[$t_gid]['ratio_data'][$v['begin_time']]['row'] += 1; } $senddata[$t_gid]['row'] = count($CpRadio[$t_gid]); }else{ @@ -1349,23 +1363,29 @@ class PromoteCompanyController extends ThinkController $diff_ids = implode(",",array_keys($game_arr)); $company_belong = M("PromoteCompany","tab_")->field("company_belong")->where("id='{$company_id}'")->find()['company_belong']; - $mwhere = "company_belong='{$company_belong}' and relation_game_id in ({$diff_ids})"; + $mwhere = "(end_time = 0 OR end_time >= '{$endtime}') and company_belong='{$company_belong}' and relation_game_id in ({$diff_ids})"; $m_res = M("GameRatioMould","tab_")->where($mwhere)->select(); if(!empty($m_res)){ foreach ($m_res as $k => $v) { $t_gid = $v['relation_game_id']; unset($game_arr[$t_gid]); - $senddata[$t_gid] = ["turnover_ratio"=>$v['turnover_ratio'],"ratio"=>!$is_inside?$v['ratio']:0,"relation_game_id"=>$v['relation_game_id']]; + + $senddata[$t_gid]['ratio_data'][$v['begin_time']] = ["turnover_ratio"=>$v['turnover_ratio'],"ratio"=>!$is_inside?$v['ratio']:0,"relation_game_id"=>$v['relation_game_id'],'time'=>date("Y-m-d",$v['begin_time'])."-".($v['end_time']?date("Y-m-d",$v['end_time']):"永久")]; $senddata[$t_gid] += $game[$t_gid]; - $this->setPromoteRadio($senddata[$t_gid],$is_inside); + + $this->setPromoteRadio($senddata[$t_gid]['ratio_data'][$v['begin_time']],$is_inside); + + $senddata[$t_gid]['row'] += $senddata[$t_gid]['ratio_data'][$v['begin_time']]['row']; + if($is_export){ if(isset($CpRadio[$t_gid])){ $senddata[$t_gid]["cp_ratio"] = $CpRadio[$t_gid]; if( count($CpRadio[$t_gid]) >= $senddata[$t_gid]['row'] ){ $c = count($CpRadio[$t_gid]) - $senddata[$t_gid]['row']; for ($x=0; $x<$c; $x++) { - $senddata[$t_gid]['turnover_ratio'][]=["name"=>"--","ratio"=>"--"]; + $senddata[$t_gid]['ratio_data'][$v['begin_time']]['turnover_ratio'][]=["name"=>"--","ratio"=>"--"]; + $senddata[$t_gid]['ratio_data'][$v['begin_time']]['row'] += 1; } $senddata[$t_gid]['row'] = count($CpRadio[$t_gid]); }else{ @@ -1384,7 +1404,9 @@ class PromoteCompanyController extends ThinkController } foreach($game_arr as $k=>$v){ if(empty($game[$k])) continue; - $senddata[$k]= ["turnover_ratio"=>[["name"=>"--","ratio"=>"--"]],"ratio"=>0,"relation_game_id"=>$k,"cp_ratio"=>[["name"=>"--","ratio"=>"--"]],"row"=>1]; + $senddata[$k]['ratio_data']['1567267200']= ["turnover_ratio"=>[["name"=>"--","ratio"=>"--"]],"ratio"=>0,"relation_game_id"=>$k,"cp_ratio"=>[["name"=>"--","ratio"=>"--"]],'time'=>date("Y-m-d",1567267200)."-"."永久"]; + $senddata[$k]["row"] = 1; + $senddata[$k] += $game[$k]; } return $senddata; @@ -1411,7 +1433,7 @@ class PromoteCompanyController extends ThinkController //无会长 return ["list"=>["account" => "--","list" => ["turnover_ratio"=>[["name"=>"--","ratio"=>"--"]],"ratio"=>0,"relation_game_id"=>$k,"cp_ratio"=>[["name"=>"--","ratio"=>"--"]],"row"=>1,"original_package_name"=>"--","relation_game_name"=>"--","game_type_name"=>"--"]],"row"=>1]; } - + foreach ($promoteres as $k => &$v) { $admin = isset($adminList[$v['id']]) && $adminList[$v['id']]['admin'] ? $adminList[$v['id']]['admin'] : null; $v['market_admin_username'] = $admin ? ($admin['real_name'] ? $admin['real_name'] : $admin['username']) : '无'; diff --git a/Application/Admin/View/CompanyGameRatio/addRatio.html b/Application/Admin/View/CompanyGameRatio/addRatio.html index 1105ad810..e49ec2b50 100644 --- a/Application/Admin/View/CompanyGameRatio/addRatio.html +++ b/Application/Admin/View/CompanyGameRatio/addRatio.html @@ -100,6 +100,18 @@
+ + + + + +
*推广公司类型: + +
*推广公司: @@ -314,13 +326,6 @@ $(function(){ }); var momday = getMonday(); - //判断日期是否小于当周周一 - // if (momday > cres.begin_time) { - // layer.msg("配置的开始日期不能小于当周周一", {icon: 2}); - // return false; - // } - - if(!flag){ return false; } diff --git a/Application/Admin/View/CompanyGameRatio/edit.html b/Application/Admin/View/CompanyGameRatio/edit.html index 8f652b7cb..4abe2e520 100644 --- a/Application/Admin/View/CompanyGameRatio/edit.html +++ b/Application/Admin/View/CompanyGameRatio/edit.html @@ -100,6 +100,13 @@
+ + + + + @@ -187,6 +188,17 @@ + + @@ -165,6 +166,7 @@ + @@ -222,6 +224,7 @@ + @@ -252,6 +255,7 @@ + @@ -282,6 +286,7 @@ + @@ -305,6 +310,7 @@ + diff --git a/Application/Admin/View/PromoteCompany/export.html b/Application/Admin/View/PromoteCompany/export.html index 929abc274..50838ed1f 100644 --- a/Application/Admin/View/PromoteCompany/export.html +++ b/Application/Admin/View/PromoteCompany/export.html @@ -51,6 +51,7 @@ + @@ -116,18 +117,29 @@ - - - + + + + + + + + + - - - - + + + + + + + + + @@ -137,6 +149,7 @@ + @@ -149,6 +162,7 @@ + @@ -176,24 +190,6 @@ - - - - - - - - - - - - - - - - - - @@ -204,34 +200,55 @@ - + + + + + + + - - + + - - + + + + + + + - + + + - - - - - - - - - + $count = 1; + + + + + + + + + + + + + $count++; + + + - + @@ -250,20 +267,33 @@ + + + + + + - - - - - + + + + + + + + + - - + + + + + @@ -271,24 +301,10 @@ + - - - - - - - - - - - - - - - @@ -297,37 +313,56 @@ - - + + + + + + + + - - + + - - - + + + + + + + + - + + - - - - - - - - - - + $count = 1; + + + + + + + + + + + + + $count++; + + + - + @@ -336,17 +371,9 @@ - - - - - - - - - @@ -356,10 +383,10 @@ + @@ -20,8 +22,8 @@
@@ -36,7 +38,7 @@
@@ -135,7 +137,7 @@
推广公司类型: + {$data.company_belong} + +
推广公司: diff --git a/Application/Admin/View/CompanyGameRatio/editRatio.html b/Application/Admin/View/CompanyGameRatio/editRatio.html index b0a16d6d3..f42a283cb 100644 --- a/Application/Admin/View/CompanyGameRatio/editRatio.html +++ b/Application/Admin/View/CompanyGameRatio/editRatio.html @@ -100,6 +100,13 @@
+ + + + + @@ -166,6 +167,7 @@ + + @@ -254,6 +257,7 @@ + @@ -270,6 +274,7 @@ + @@ -284,6 +289,7 @@ + @@ -307,6 +313,7 @@ + @@ -404,6 +411,12 @@ changeSumAmount(); }); + $(".withhold").on("blur",function () { + caculate_sum_money(this); + changeStatementAmount(this); + changeSumAmount(); + }); + $(".ratio").on("blur",function () { caculate_sum_money(this); changeStatementAmount(this); @@ -438,6 +451,17 @@ refund = pay_money; $(_this).parent().parent().find(".refund").val(refund); } + + //退款 + var withhold = $(_this).parent().parent().find(".withhold").val(); + if (!withhold || withhold < 0) { + withhold = 0; + $(_this).parent().parent().find(".withhold").val(withhold); + } else if(parseFloat(withhold) > parseFloat(pay_money)) { + withhold = pay_money; + $(_this).parent().parent().find(".withhold").val(withhold); + } + //补点 var increment_ratio = $(_this).parent().parent().find(".increment_ratio").val(); if (!increment_ratio || increment_ratio < 0) { @@ -453,7 +477,7 @@ //扣款 pay_money = parseFloat(pay_money) - parseFloat(refund); - var value = parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100); + var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100)) - parseFloat(withhold); $(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2)); $(_this).parent().parent().find(".sum_money").val(value.toFixed(2)); @@ -464,7 +488,7 @@ for (;;) { week_amount = week_amount_find.find(".week_amount").text(); - if (week_amount_find) { + if (week_amount) { break; } else { week_amount_find = week_amount_find.prev(); diff --git a/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html new file mode 100644 index 000000000..e13fd5579 --- /dev/null +++ b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html @@ -0,0 +1,557 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
推广公司类型: + {$data.company_belong} + +
推广公司: diff --git a/Application/Admin/View/CompanyStatementPool/editPuPool.html b/Application/Admin/View/CompanyStatementPool/editPuPool.html index 354397cb2..a7e200b0d 100644 --- a/Application/Admin/View/CompanyStatementPool/editPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editPuPool.html @@ -116,6 +116,7 @@ 结算时间 推广流水 退款其他扣款 分成比例 补点 分成结算金额 {$com['statement_info'][0]['game_list'][0]['pay_amount']} % % {$com['statement_info'][0]['game_list'][0]['sum_money']} @@ -225,6 +227,7 @@ {$game['pay_amount']} % % {$game['sum_money']} % % {$account['game_list'][0]['sum_money']}- - --
% % {$game['sum_money']} {$count.sum_money} {$count.sum_money}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
序号下游名称会长账号内外团开发类型市场专员下游性质产品产品类型结算时间推广流水退款其他扣款分成比例补点分成结算金额奖励罚款周结算金额结算金额户名帐号开户行是否支付宝打款是否结算备注操作
{$key-0+1}{$com.company_name}{$com['statement_info'][0]['account']}-{$com.company_info.company_belong_str}{$com.company_info.company_relation_str}{$com.company_info.nickname}{$com.company_info.company_type_str}{$com['statement_info'][0]['game_list'][0]['game_name']}{$com['statement_info'][0]['game_list'][0]['game_type_name']}{$com['statement_info'][0]['time']}{$com['statement_info'][0]['game_list'][0]['pay_amount']}{$com['statement_info'][0]['game_list'][0]['ratio']}%%{$com['statement_info'][0]['game_list'][0]['sum_money']} + + {$com['reward']}{$com['fine']}{$com['statement_info'][0]['week_amount']}{$com['statement_money']}-----------{$com.company_info.payee_name} {$com.company_info.bank_account}{$com.company_info.opening_bank}{$com.company_info.ali_user}{$com.company_info.ali_account} + + 不结算 + +
{$game['game_name']}{$game['game_type_name']}{$game['pay_amount']}{$game['ratio']}%%{$game['sum_money']}
{$account['account']}{$account['game_list'][0]['game_name']}{$account['game_list'][0]['game_type_name']}{$account['time']}{$account['game_list'][0]['pay_amount']}{$account['game_list'][0]['ratio']}%%{$account['game_list'][0]['sum_money']}{$account['week_amount']}----------
{$game['game_name']}{$game['game_type_name']}{$game['pay_amount']}{$game['ratio']}%%{$game['sum_money']}
合计:{$count.platform_amount}{$count.sum_money}{$count.sum_money}
+ + +
+ + +
+ + +
+ + + + diff --git a/Application/Admin/View/CompanyStatementPool/lists.html b/Application/Admin/View/CompanyStatementPool/lists.html index 27e67b11f..aec38daca 100644 --- a/Application/Admin/View/CompanyStatementPool/lists.html +++ b/Application/Admin/View/CompanyStatementPool/lists.html @@ -160,6 +160,7 @@
不结算金额 创建记录初审状态 审批状态 打款状态 凭证 {$data.lack_statement_money} {$data.create} + +
+ {$data.firstverify} +
+ +
+ {$data.firstverify} +
+
+
@@ -307,17 +319,40 @@ }); }); + $(".editSpecialPuPool").click(function () { + var id = $(this).data("id"); + var url = "{:U('editPool')}"+"&id="+id+"&type=1" + layer.open({ + type: 2, + title: "海南万盟天下科技有限公司", + shadeClose: true, + shade: 0.8, + area: ['100%', '100%'], + content: url + }); + }); + - $("#verifyAgree,#verifyRefuse").on("click",function(){ + $("#verifyAgree,#verifyRefuse,#firstverifyAgree,#firstverifyRefuse").on("click",function(){ var id = $(this).attr("id"); if(id == "verifyAgree"){ var opname = "审批通过"; var opurl = "{:U('verifyAgree')}"; - var opst ="[未进行审批]"; - var status = [0]; + var opst ="[初审通过]"; + var status = [6]; }else if(id=="verifyRefuse"){ var opname = "审批拒绝"; var opurl = "{:U('verifyRefuse')}"; + var opst ="[初审通过]"; + var status = [6]; + }else if(id=="firstverifyAgree"){ + var opname = "初审通过"; + var opurl = "{:U('firstverifyAgree')}"; + var opst ="[未进行审批]"; + var status = [0]; + }else if(id=="firstverifyRefuse"){ + var opname = "初审拒绝"; + var opurl = "{:U('firstverifyRefuse')}"; var opst ="[未进行审批]"; var status = [0]; } diff --git a/Application/Admin/View/CompanyStatementPool/viewPuPool.html b/Application/Admin/View/CompanyStatementPool/viewPuPool.html index 53a4d1ef0..4a34320ed 100644 --- a/Application/Admin/View/CompanyStatementPool/viewPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/viewPuPool.html @@ -114,6 +114,7 @@
结算时间 推广流水 退款其他扣款 分成比例 补点 分成结算金额 {$com['statement_info'][0]['game_list'][0]['pay_amount']} {$com['statement_info'][0]['game_list'][0]['refund']|default=0}{$com['statement_info'][0]['game_list'][0]['withhold']|default=0} {$com['statement_info'][0]['game_list'][0]['ratio']}% {$com['statement_info'][0]['game_list'][0]['increment_ratio']}% {$com['statement_info'][0]['game_list'][0]['sum_money']} {$game['pay_amount']} {$game['refund']|default=0}{$game['withhold']|default=0} {$game['ratio']}% {$game['increment_ratio']}% {$game['sum_money']} {$account['game_list'][0]['refund']|default=0}{$account['game_list'][0]['withhold']|default=0} {$account['game_list'][0]['ratio']}% {$account['game_list'][0]['increment_ratio']}% {$account['game_list'][0]['sum_money']} {$game['refund']|default=0}{$game['withhold']|default=0} {$game['ratio']}% {$game['increment_ratio']}% {$game['sum_money']} {$count.week_money} {$count.sum_money} 现包名 聚合包名 产品类型游戏比例生效时间 推广分成比例 CP分成比例 {$data['list'][0]['list'][0]['game_type_name']|default="--"}{$data['list'][0]['list'][0]['turnover_ratio'][0]['name']|default="--"}{$data['list'][0]['list'][0]['turnover_ratio'][0]['ratio']|showPercent}{$data['list'][0]['list'][0]['ratio_data'][0]['time']|default="--"}--{$data['list'][0]['list'][0]['ratio_data'][0]['turnover_ratio'][0]['name']|default="--"}{$data['list'][0]['list'][0]['ratio_data'][0]['turnover_ratio'][0]['ratio']|showPercent}{$data['list'][0]['list'][0]['cp_ratio'][0]['name']|default="--"}{$data['list'][0]['list'][0]['cp_ratio'][0]['ratio']|showPercent} -- ------ {$data['list'][0]['list'][0]['cp_ratio'][0]['name']|default="--"}{$data['list'][0]['list'][0]['cp_ratio'][0]['ratio']|showPercent}------ ---- -- ---- ---- -- ---- {$data.bank_address|default="--"}
{$game_ratio['name']|default="--"}{$game_ratio['ratio']|showPercent}{$data['list'][0]['list'][0]['cp_ratio'][$gamekey]['name']|default="--"}{$data['list'][0]['list'][0]['cp_ratio'][$gamekey]['ratio']|showPercent}
{$p_ratio['aggregate_gamename']|default="--"} {$p_ratio['game_type_name']|default="--"}{$p_ratio['ratio_data'][0]['time']|default="--"}--{$p_ratio['turnover_ratio'][0]['name']|default="--"}{$p_ratio['turnover_ratio'][0]['ratio']|showPercent}{$p_ratio['ratio_data'][0]['turnover_ratio'][0]['name']|default="--"}{$p_ratio['ratio_data'][0]['turnover_ratio'][0]['ratio']|showPercent}{$p_ratio['cp_ratio'][0]['name']|default="--"}{$p_ratio['cp_ratio'][0]['ratio']|showPercent} - -{$p_ratio['cp_ratio'][0]['name']|default="--"}{$p_ratio['cp_ratio'][0]['ratio']|showPercent}- -
{$game_ratio['name']|default="--"}{$game_ratio['ratio']|showPercent}{$p_ratio['cp_ratio'][$gamekey]['name']|default="--"}{$p_ratio['cp_ratio'][$gamekey]['ratio']|showPercent}
{$ratio['time']|default="--"}{$game_ratio['name']|default="--"}{$game_ratio['ratio']|showPercent}{$p_ratio['cp_ratio'][$count]['name']|default="--"}{$p_ratio['cp_ratio'][$count]['ratio']|showPercent}
{$promote['list'][0]['relation_game_name']|default="--"} {$promote['list'][0]['aggregate_gamename']|default="--"} {$promote['list'][0]['game_type_name']|default="--"}{$promote['list'][0]['ratio_data'][0]['time']|default="--"}--{$promote['list'][0]['turnover_ratio'][0]['name']|default="--"}{$promote['list'][0]['turnover_ratio'][0]['ratio']|showPercent}{$promote['list'][0]['cp_ratio'][0]['name']|default="--"}{$promote['list'][0]['cp_ratio'][0]['ratio']|showPercent}{$promote['list'][0]['ratio_data'][0]['turnover_ratio'][0]['name']|default="--"}{$promote['list'][0]['ratio_data'][0]['turnover_ratio'][0]['ratio']|showPercent} -- --{$promote['list'][0]['cp_ratio'][0]['name']|default="--"}{$promote['list'][0]['cp_ratio'][0]['ratio']|showPercent}-- ---- -- ---- -- ----
{$game_ratio['name']|default="--"}{$game_ratio['ratio']|showPercent}{$promote['list'][0]['cp_ratio'][$gamekey]['name']|default="--"}{$promote['list'][0]['cp_ratio'][$gamekey]['ratio']|showPercent}
{$game['relation_game_name']|default="--"} {$game['aggregate_gamename']|default="--"} {$game['game_type_name']|default="--"}{$game['ratio_data'][0]['time']|default="--"}--{$game['turnover_ratio'][0]['name']|default="--"}{$game['turnover_ratio'][0]['ratio']|showPercent}{$game['ratio_data'][0]['turnover_ratio'][0]['name']|default="--"}{$game['ratio_data'][0]['turnover_ratio'][0]['ratio']|showPercent}{$game['cp_ratio'][0]['name']|default="--"}{$game['cp_ratio'][0]['ratio']|showPercent} - - -{$game['cp_ratio'][0]['name']|default="--"}{$game['cp_ratio'][0]['ratio']|showPercent}- -
{$game_ratio2['name']|default="--"}{$game_ratio2['ratio']|showPercent}{$game['cp_ratio'][$gamekey2]['name']|default="--"}{$game['cp_ratio'][$gamekey2]['ratio']|showPercent}
{$ratio['time']|default="--"}{$game_ratio2['name']|default="--"}{$game_ratio2['ratio']|showPercent}{$game['cp_ratio'][$count]['name']|default="--"}{$game['cp_ratio'][$count]['ratio']|showPercent}
汇总: + 累计推广公司数量:{$count}  会长数量:{$promotecount}
*合同合作方名称: - +
- + + + + + + + + + + + + + + - - - + - + @@ -163,14 +162,13 @@ - + - - + @@ -223,13 +221,13 @@ - + - + @@ -252,10 +250,9 @@ - + - - + @@ -264,9 +261,9 @@ - + - --> + @@ -292,15 +289,14 @@ - + - - + - + From 9b87b9c4a10f9b00eea6370e3524f6457b6ef2c2 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 25 Nov 2020 16:49:10 +0800 Subject: [PATCH 36/53] =?UTF-8?q?11=E6=9C=88=E5=8A=9F=E8=83=BD=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyGameRatioController.class.php | 26 +++++++++---------- .../CompanyStatementSetController.class.php | 12 ++++----- .../Admin/View/CompanyGameRatio/addRatio.html | 4 +-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Application/Admin/Controller/CompanyGameRatioController.class.php b/Application/Admin/Controller/CompanyGameRatioController.class.php index b34a95943..20db93a21 100644 --- a/Application/Admin/Controller/CompanyGameRatioController.class.php +++ b/Application/Admin/Controller/CompanyGameRatioController.class.php @@ -562,22 +562,22 @@ class CompanyGameRatioController extends AdminController } // dump($end_time);dump($begin_time);die(); $check_data = M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$begin_time,'end_time'=>$end_time]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$begin_time,'end_time'=>$end_time]) ->find(); if ($check_data) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$begin_time,'end_time'=>$end_time]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$begin_time,'end_time'=>$end_time]) ->save($ratiov); return; } M("company_game_ratio","tab_") // ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>['egt',$begin_time],'end_time'=>['elt',$end_time]]) - ->where("company_belong={$company_belong} and company_id={$company_id} and relation_game_id={$relation_game_id} and begin_time>={$begin_time} and end_time <= {$end_time} and end_time!=0") + ->where("company_id={$company_id} and relation_game_id={$relation_game_id} and begin_time>={$begin_time} and end_time <= {$end_time} and end_time!=0") ->delete(); $data = M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id]) ->order("begin_time DESC") ->select(); @@ -587,7 +587,7 @@ class CompanyGameRatioController extends AdminController if (!$end_time) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->delete(); continue; } @@ -598,18 +598,18 @@ class CompanyGameRatioController extends AdminController if ($end_time > $value['begin_time'] && ($end_time < $value['end_time']||$value['end_time']==0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['begin_time'=>$end_time+1]); } else if ($end_time > $value['begin_time'] && ($end_time >= $value['end_time']&&$value['end_time']!=0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['begin_time'=>$begin_time,'end_time'=>$end_time]); } } else if ($value['begin_time'] <= $begin_time) { if (!$end_time&&($value['end_time']>$begin_time||$value['end_time']==0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['end_time'=>$begin_time-1]); continue; }else if (!$end_time) { @@ -621,11 +621,11 @@ class CompanyGameRatioController extends AdminController } if ($begin_time > $value['begin_time'] && ($end_time >= $value['end_time'] && $value['end_time']!=0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['end_time'=>$begin_time-1]); } else if ($begin_time > $value['begin_time'] && ($end_time < $value['end_time']||$value['end_time']==0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['end_time'=>$begin_time-1]); $dataValue = $value; $dataValue['begin_time'] = $end_time+1; @@ -634,15 +634,15 @@ class CompanyGameRatioController extends AdminController } else if ($begin_time == $value['begin_time'] && ($end_time < $value['end_time']||$value['end_time']==0)) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['begin_time'=>$end_time+1]); } else if ($end_time == $value['end_time']&&$begin_time>$value['begin_time']) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['end_time'=>$begin_time-1]); } else if ($end_time == $value['end_time']&&$begin_time == $value['begin_time']) { M("company_game_ratio","tab_") - ->where(['company_belong'=>$company_belong,'company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) + ->where(['company_id'=>$company_id,'relation_game_id'=>$relation_game_id,'begin_time'=>$value['begin_time'],'end_time'=>$value['end_time']]) ->save(['begin_time'=>$begin_time,'end_time'=>$end_time]); } diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 628b6db50..8ff15c6f5 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -1328,9 +1328,9 @@ class CompanyStatementSetController extends Controller { $cpSpendList = $Spend->alias('s')->field('sum(s.pay_amount) pay_amount,s.game_id,g.relation_game_id,g.relation_game_name game_name')->where($cpMap)->group('game_id') ->join("left join tab_game g on s.game_id = g.id") ->select(); - if ($company_id == 43) { - dump($cpMap); - } +// if ($company_id == 43) { +// dump($cpMap); +// } foreach($cpSpendList as $ck=>$cv){ if(isset($cpgame[$cv['relation_game_id']])){ $cpgame[$cv['relation_game_id']]['pay_amount'] += $cv['pay_amount']; @@ -1398,9 +1398,9 @@ class CompanyStatementSetController extends Controller { $cpSpendList = $Spend->alias('s')->field('sum(s.pay_amount) pay_amount,s.game_id,g.relation_game_id,g.relation_game_name game_name')->where($cpMap)->group('game_id') ->join("left join tab_game g on s.game_id = g.id") ->select(); - if ($company_id == 43) { - dump($cpMap); - } +// if ($company_id == 43) { +// dump($cpMap); +// } foreach($cpSpendList as $ck=>$cv){ if(isset($cpgame[$cv['relation_game_id']])){ diff --git a/Application/Admin/View/CompanyGameRatio/addRatio.html b/Application/Admin/View/CompanyGameRatio/addRatio.html index aec8fa3ce..5dffbc456 100644 --- a/Application/Admin/View/CompanyGameRatio/addRatio.html +++ b/Application/Admin/View/CompanyGameRatio/addRatio.html @@ -102,7 +102,7 @@ - + - + - + From ff21751d3108c3b10195184bfd88d1377ff4443b Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 26 Nov 2020 14:48:23 +0800 Subject: [PATCH 41/53] =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=80=BC=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Model/CompanyGameRatioModel.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Model/CompanyGameRatioModel.class.php b/Application/Admin/Model/CompanyGameRatioModel.class.php index 1f20fef58..7c03414c7 100644 --- a/Application/Admin/Model/CompanyGameRatioModel.class.php +++ b/Application/Admin/Model/CompanyGameRatioModel.class.php @@ -48,7 +48,7 @@ class CompanyGameRatioModel extends Model if ($value['begin_time'] > $company_begin_time) { $game_ratio[$game_id] = array_merge($game_ratio[$game_id],$this->getGameRadio($company_id,$game_id,$company_belong,$company_begin_time,$value['begin_time'])); - if ($value['end_time'] >= $company_end_time) { + if ($value['end_time'] >= $company_end_time || !$value['end_time']) { // $game_ratio[$game_id] = array_merge($game_ratio[$game_id],[[ // "begintime" => $value['begin_time'], // "endtime"=>$company_end_time, @@ -75,7 +75,7 @@ class CompanyGameRatioModel extends Model } } } else { - if ($value['end_time'] >= $company_end_time) { + if ($value['end_time'] >= $company_end_time || !$value['end_time']) { // $game_ratio[$game_id] = array_merge($game_ratio[$game_id],[[ // "begintime" => $company_begin_time, // "endtime"=>$company_end_time, From 4dd097667f0fae02e4acaccc0e66e78e4c9703bd Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 26 Nov 2020 16:15:11 +0800 Subject: [PATCH 42/53] =?UTF-8?q?=E5=86=85=E5=9B=A2=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E6=AF=94=E4=BE=8B=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4=E5=87=8F?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Model/CompanyGameRatioModel.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Model/CompanyGameRatioModel.class.php b/Application/Admin/Model/CompanyGameRatioModel.class.php index 7c03414c7..f77e8789d 100644 --- a/Application/Admin/Model/CompanyGameRatioModel.class.php +++ b/Application/Admin/Model/CompanyGameRatioModel.class.php @@ -46,7 +46,7 @@ class CompanyGameRatioModel extends Model foreach($company_belong_game as $key => $value) { if ($value['begin_time'] > $company_begin_time) { - $game_ratio[$game_id] = array_merge($game_ratio[$game_id],$this->getGameRadio($company_id,$game_id,$company_belong,$company_begin_time,$value['begin_time'])); + $game_ratio[$game_id] = array_merge($game_ratio[$game_id],$this->getGameRadio($company_id,$game_id,$company_belong,$company_begin_time,$value['begin_time']-1)); if ($value['end_time'] >= $company_end_time || !$value['end_time']) { // $game_ratio[$game_id] = array_merge($game_ratio[$game_id],[[ From 1717c2958b0ff956ff07ae767b6f5092e4983d06 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 26 Nov 2020 16:49:08 +0800 Subject: [PATCH 43/53] =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=80=BC=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/MarketPercentageController.class.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index 9dd1205ee..14c4b2f2b 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -1616,9 +1616,16 @@ class MarketPercentageController extends ThinkController } - $belong_game = M("company_belong_game","tab_") - ->where("((begin_time<={$time_start} and (end_time >={$time_start} or end_time=0)) or (begin_time<={$time_end} and end_time >={$time_end}) or (end_time>={$time_start} and end_time <={$time_end})) and id != {$id}") - ->select(); + if ($_POST['end_time']) { + $belong_game = M("company_belong_game","tab_") + ->where("((begin_time<={$time_start} and (end_time >={$time_start} or end_time=0)) or (begin_time<={$time_end} and end_time >={$time_end}) or (end_time>={$time_start} and end_time <={$time_end})) and id != {$id}") + ->select(); + } else { + $belong_game = M("company_belong_game","tab_") + ->where("(begin_time>={$time_start} or (end_time >={$time_start})) and id != {$id}") + ->select(); + } + if ($belong_game) { From c829c56956e3bdab0529040a837e6fbc02bc96e7 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 26 Nov 2020 17:11:04 +0800 Subject: [PATCH 44/53] =?UTF-8?q?=E4=BF=9D=E7=95=99=E4=B8=A4=E4=BD=8D?= =?UTF-8?q?=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/CompanyStatementSetController.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index e8bb16d28..c199b2594 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -732,7 +732,7 @@ class CompanyStatementSetController extends Controller { $game['statement_begin_time']=$statement_begin_time; $game['statement_end_time']=$statement_end_time; - $add_data['pay_amount'] += $game['pay_amount']; + $add_data['pay_amount'] += round($game['pay_amount'],2); if($type == 1){ $tratio =$this->getTurnoverRatio($game_all_payment,$tmp_game_ratio['ratio'],$tmp_game_ratio['turnover_ratio']); @@ -785,7 +785,7 @@ class CompanyStatementSetController extends Controller { // dd($t_game_id); $temp_game['pay_amount'] =$this->getRelationGameIdSpend($add_data['company_id'],$t_game_id,$tmp_game_ratio['begintime'],$tmp_game_ratio['endtime']); $temp_game['pay_amount'] -=0; - $add_data['pay_amount'] += $temp_game['pay_amount']; + $add_data['pay_amount'] += round($temp_game['pay_amount'],2); if($type == 1){ @@ -1686,7 +1686,7 @@ class CompanyStatementSetController extends Controller { $v['platform_amount'] += $p_info['pay_amount']; $p_info['sum_money']=round($p_info['pay_amount']*$tratio/100,2); //个人等于 结算金额*比例 - $v['pay_amount'] += $p_info['sum_money']; + $v['pay_amount'] += round($p_info['sum_money'],2);; $v['statement_money'] += $p_info['sum_money']; $p_info['fax_ratio']=$fax_ratio; $p_info['statement_begin_time']=$statement_begin_time; @@ -1763,7 +1763,7 @@ class CompanyStatementSetController extends Controller { $v['platform_amount'] += $temp_game['pay_amount']; $temp_game['sum_money']=round($temp_game['pay_amount']*$tratio/100,2); //个人等于 结算金额*比例 - $v['pay_amount'] += $temp_game['sum_money']; + $v['pay_amount'] += round($temp_game['sum_money'],2); $v['statement_money'] += $temp_game['sum_money']; $temp_game['fax_ratio']=$fax_ratio-0; From 711992a287b93acf606e01174f234144d3b1962f Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 26 Nov 2020 17:19:09 +0800 Subject: [PATCH 45/53] =?UTF-8?q?=E4=BF=9D=E7=95=99=E4=B8=A4=E4=BD=8D?= =?UTF-8?q?=E5=B0=8F=E6=95=B0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/CompanyStatementSetController.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index c199b2594..5faba545f 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -732,7 +732,7 @@ class CompanyStatementSetController extends Controller { $game['statement_begin_time']=$statement_begin_time; $game['statement_end_time']=$statement_end_time; - $add_data['pay_amount'] += round($game['pay_amount'],2); + $add_data['pay_amount'] += $game['pay_amount']; if($type == 1){ $tratio =$this->getTurnoverRatio($game_all_payment,$tmp_game_ratio['ratio'],$tmp_game_ratio['turnover_ratio']); @@ -785,7 +785,7 @@ class CompanyStatementSetController extends Controller { // dd($t_game_id); $temp_game['pay_amount'] =$this->getRelationGameIdSpend($add_data['company_id'],$t_game_id,$tmp_game_ratio['begintime'],$tmp_game_ratio['endtime']); $temp_game['pay_amount'] -=0; - $add_data['pay_amount'] += round($temp_game['pay_amount'],2); + $add_data['pay_amount'] += $temp_game['pay_amount']; if($type == 1){ @@ -1686,7 +1686,7 @@ class CompanyStatementSetController extends Controller { $v['platform_amount'] += $p_info['pay_amount']; $p_info['sum_money']=round($p_info['pay_amount']*$tratio/100,2); //个人等于 结算金额*比例 - $v['pay_amount'] += round($p_info['sum_money'],2);; + $v['pay_amount'] += $p_info['sum_money']; $v['statement_money'] += $p_info['sum_money']; $p_info['fax_ratio']=$fax_ratio; $p_info['statement_begin_time']=$statement_begin_time; @@ -1763,7 +1763,7 @@ class CompanyStatementSetController extends Controller { $v['platform_amount'] += $temp_game['pay_amount']; $temp_game['sum_money']=round($temp_game['pay_amount']*$tratio/100,2); //个人等于 结算金额*比例 - $v['pay_amount'] += round($temp_game['sum_money'],2); + $v['pay_amount'] += $temp_game['sum_money']; $v['statement_money'] += $temp_game['sum_money']; $temp_game['fax_ratio']=$fax_ratio-0; @@ -1908,7 +1908,7 @@ class CompanyStatementSetController extends Controller { "company_name"=>$v['partner'], "company_info"=>json_encode($company_info,JSON_UNESCAPED_UNICODE), "statement_money"=>$v['statement_money'], - "pay_amount"=>$v['pay_amount'], + "pay_amount"=>round($v['pay_amount'],2), "platform_amount"=>$v['platform_amount'], "fine"=>$v['fine'], "reward"=>$v['reward'], From b54b2660d485da4e92fbb58aac6f1daf18e2b583 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 26 Nov 2020 17:26:31 +0800 Subject: [PATCH 46/53] =?UTF-8?q?=E5=B0=8F=E6=95=B0=E7=82=B9=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E4=B8=A4=E4=BD=8D=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementSetController.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 5faba545f..56796605f 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -1684,6 +1684,8 @@ class CompanyStatementSetController extends Controller { $p_info['pay_amount'] = $this->getRelationGameIdPromoteSpend($p_info["p_id"],$p_info['relation_game_id'],$tmp_game_ratio['begintime'],$tmp_game_ratio['endtime']); + $p_info['pay_amount'] = round($p_info['pay_amount'],2); + $v['platform_amount'] += $p_info['pay_amount']; $p_info['sum_money']=round($p_info['pay_amount']*$tratio/100,2); //个人等于 结算金额*比例 $v['pay_amount'] += $p_info['sum_money']; @@ -1760,6 +1762,7 @@ class CompanyStatementSetController extends Controller { } $temp_game['pay_amount'] = $this->getRelationGameIdPromoteSpend($p_info["p_id"],$p_info['relation_game_id'],$tmp_game_ratio['begintime'],$tmp_game_ratio['endtime']); $temp_game['pay_amount'] -=0; + $temp_game['pay_amount'] = round($temp_game['pay_amount'],2); $v['platform_amount'] += $temp_game['pay_amount']; $temp_game['sum_money']=round($temp_game['pay_amount']*$tratio/100,2); //个人等于 结算金额*比例 @@ -1908,7 +1911,7 @@ class CompanyStatementSetController extends Controller { "company_name"=>$v['partner'], "company_info"=>json_encode($company_info,JSON_UNESCAPED_UNICODE), "statement_money"=>$v['statement_money'], - "pay_amount"=>round($v['pay_amount'],2), + "pay_amount"=>$v['pay_amount'], "platform_amount"=>$v['platform_amount'], "fine"=>$v['fine'], "reward"=>$v['reward'], From ed8d1fee0ad87803f7bf547d7e57a8cd425cf7be Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 26 Nov 2020 17:30:24 +0800 Subject: [PATCH 47/53] =?UTF-8?q?=E5=B0=8F=E6=95=B0=E7=82=B9=E4=BF=9D?= =?UTF-8?q?=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementSetController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 56796605f..37ffa7960 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -1684,7 +1684,7 @@ class CompanyStatementSetController extends Controller { $p_info['pay_amount'] = $this->getRelationGameIdPromoteSpend($p_info["p_id"],$p_info['relation_game_id'],$tmp_game_ratio['begintime'],$tmp_game_ratio['endtime']); - $p_info['pay_amount'] = round($p_info['pay_amount'],2); + $p_info['pay_amount'] = number_format($p_info['pay_amount'],2,'.',''); $v['platform_amount'] += $p_info['pay_amount']; $p_info['sum_money']=round($p_info['pay_amount']*$tratio/100,2); //个人等于 结算金额*比例 @@ -1762,7 +1762,7 @@ class CompanyStatementSetController extends Controller { } $temp_game['pay_amount'] = $this->getRelationGameIdPromoteSpend($p_info["p_id"],$p_info['relation_game_id'],$tmp_game_ratio['begintime'],$tmp_game_ratio['endtime']); $temp_game['pay_amount'] -=0; - $temp_game['pay_amount'] = round($temp_game['pay_amount'],2); + $temp_game['pay_amount'] = number_format($temp_game['pay_amount'],2,'.',''); $v['platform_amount'] += $temp_game['pay_amount']; $temp_game['sum_money']=round($temp_game['pay_amount']*$tratio/100,2); //个人等于 结算金额*比例 From 73f8c1637949339ff5db2527c42bc3c57ca48bab Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 26 Nov 2020 17:32:13 +0800 Subject: [PATCH 48/53] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/FinanceController.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 6245f8322..0434f8e5c 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -1004,6 +1004,10 @@ class FinanceController extends ThinkController if (!empty(I("game_id"))) { $map['game_id'] = I("game_id"); } + if(empty(I("game_id")) && !empty(I("game_name"))){ + $map['game_name'] = array('like','%'.I("game_name").'%');; + } + if (!empty(I('user_account'))) { $map['user_account'] = array('like','%'.I("user_account").'%'); } @@ -1071,7 +1075,10 @@ class FinanceController extends ThinkController $totalMap['s.game_id'] = $map['game_id']; unset($totalMap['game_id']); } - + if ($map['game_name']) { + $totalMap['s.game_name'] = $map['game_name']; + unset($totalMap['game_name']); + } $totalData = D('spend')->totalGameStatistics($totalMap, false); $sumCash = $totalData['cash_count'] ?? 0; From 59ec6c28ca48e4db40c5328017d08bded17ad4d9 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 26 Nov 2020 18:26:32 +0800 Subject: [PATCH 49/53] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E4=B8=9A=E7=BB=A9bug?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/TimingController.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index de080719f..e2d08f314 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -1199,7 +1199,7 @@ class TimingController extends AdminController { ->join("left join tab_promote_company company on promote.company_id = company.id") ->join("left join ({$data}) auth on auth.uid=market_admin_id") ->where(['develop_type'=>['egt',1],'group_id'=>['in',['11','12','21']]]) -// ->where(['company_id'=>278,'spend.promote_id'=>3917,'relation_game_id'=>213]) +// ->where(['company_id'=>43,'spend.promote_id'=>1498,'relation_game_id'=>191]) // ->order("is_settlement ASC") ->select(); @@ -1235,6 +1235,8 @@ class TimingController extends AdminController { ->order("begin_time ASC") ->select(); +// dump($company_belong_game); + $promote_data[$key]['promote_amount'] = 0; foreach ($company_belong_game as $ck => $cv) { @@ -1294,10 +1296,10 @@ class TimingController extends AdminController { } - if ($ck > 1) { -// echo 3; - if (($cv['begin_time'] - $company_belong_game[$ck-1]['end_time'] + 86399) > 1) { + if ($ck > 0) { + if (($cv['begin_time'] - $company_belong_game[$ck-1]['end_time'] + 86399) > 1) { +// echo 3; $promote_data[$key]['promote_amount'] += $this->getCompanyGameRadio($value['admin_id'],$value['promote_id'],$value['company_id'],$value['relation_game_id'],$company_belong_game[$ck-1]['end_time'] + 86400,$cv['begin_time']-1,$value['pay_amount']); } } From b54b37e99c65aa3c23c44f5e48dc8f8054e02cff Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 27 Nov 2020 09:19:05 +0800 Subject: [PATCH 50/53] =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E5=AD=97=E6=95=B0?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 2 +- .../Controller/AggregateFinanceStatementController.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index c4d3dc4e4..a30a8d1ed 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2237,7 +2237,7 @@ function excelDownStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_al $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+10), $data['receive_company']['opening_bank']);//开户行 $height = 20; - $font_size = 56; + $font_size = 44; if (strlen($data['pay_company']['partner'])getActiveSheet()->setCellValue('E'.($line+6), $data['second_party_info']['address']);//邮寄地址 $height = 20; - $font_size = 56; + $font_size = 44; if (strlen($data['second_party_info']['partner']) Date: Fri, 27 Nov 2020 10:50:35 +0800 Subject: [PATCH 51/53] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=BB=85=E5=8D=95=E5=8F=82=E4=B8=8E=E7=BB=93=E7=AE=97=E6=98=AF?= =?UTF-8?q?=E7=BB=93=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementSetController.class.php | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 37ffa7960..55cd1331c 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -952,14 +952,16 @@ class CompanyStatementSetController extends Controller { $spenMap = [ "s.pay_status"=>1, "s.payed_time"=>['between', [$begintime,$endtime]], + "s.is_check"=>1 + ]; + $cpMap = [ + "s.pay_status"=>1, + "s.payed_time"=>['between', [$begintime,$endtime]] + ]; + $cpAllMap =[ + "s.pay_status"=>1, + "s.payed_time"=>['elt',$endtime] ]; -// dump($spenMap); - - $cpMap = $spenMap; - $cpMap["s.payed_time"] = ['between', [strtotime(date("Y-m-1",$begintime)),$endtime]]; - - $cpAllMap = $spenMap; - $cpAllMap["s.payed_time"] = ['elt',$endtime]; for ($i=0; $i 1, "s.payed_time"=>['between', [$begintime,$endtime]], + "s.is_check"=>1 ]; $cpallgame = []; $cpgame = []; - $cpMap = $spenMap; - - $cpMap["s.payed_time"] = ['between', [strtotime(date("Y-m-1",$begintime)),$endtime]]; + $cpMap = [ + "s.pay_status"=>1, + "s.payed_time"=>['between', [$begintime,$endtime]] + ]; - $cpAllMap = $spenMap; - $cpAllMap["s.payed_time"] = ['elt',$endtime]; + $cpAllMap = [ + "s.pay_status"=>1, + "s.payed_time"=>['elt',$endtime] + ]; // unset($cpAllMap["s.payed_time"]); for ($i=0; $i 1, "s.payed_time"=>['between', [$begintime,$endtime]], + "s.is_check"=>1 ]; $company_id = $company_id; @@ -2155,6 +2162,7 @@ class CompanyStatementSetController extends Controller { $spenMap = [ "s.pay_status"=>1, "s.payed_time"=>['between', [$begintime,$endtime]], + "s.is_check"=>1 ]; $Pmap = [ From 5644570c1e2e782769f386d42ea33e287882fc96 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 27 Nov 2020 14:49:00 +0800 Subject: [PATCH 52/53] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PromoteCompanyController.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 908635d09..0d47f5553 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -289,14 +289,22 @@ class PromoteCompanyController extends ThinkController if ($batchType == 1) { // 批量增加 $where['_string'] = "concat(',', game_ids, ',') not like \"%,{$gameId},%\""; $exp = "trim(BOTH ',' FROM concat(game_ids, ',', {$gameId}))"; + $op_name = "批量上架"; } if ($batchType == 2) { // 批量删除 $where['_string'] = "concat(',', game_ids, ',') like \"%,{$gameId},%\""; $exp = "trim(BOTH ',' FROM replace(concat(',', game_ids, ','), \",{$gameId},\", ','))"; + $op_name = "批量下架"; } M('promote', 'tab_')->where($where)->save([ 'game_ids' => ['exp', $exp] ]); + //加入日志 + $companys = M('promote_company', 'tab_')->field("id")->where($where)->select(); + if(!empty($companys)){ + $company_ids = implode(",",array_column($companys,"id")); + addOperationLog(['op_type'=>1,'key'=>"","op_name"=>$op_name,"content"=>json_encode(["company_id"=>$company_ids,"batchCompanyType"=>$batchCompanyType,"game_id"=>$gameId,'batch_type'=>$batchType])]); + } M('promote_company', 'tab_')->where($where)->save([ 'game_ids' => ['exp', $exp] From 7e1d2fb879d4bb055a9f433b575c5c4865777593 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 27 Nov 2020 15:02:36 +0800 Subject: [PATCH 53/53] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index a30a8d1ed..6c877ad5e 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2583,7 +2583,7 @@ function getCompanyBlongOther($id = -1) */ function addOperationLog($options) { - $checkarr = ['op_type','url','key']; + $checkarr = ['op_type','key']; foreach ($checkarr as $v) { if(!array_key_exists($v,$options)){ return false; @@ -2592,6 +2592,9 @@ function addOperationLog($options) if(!array_key_exists("op_name",$options)){ $options['op_name'] = ($options['op_type'] == 1 ? "编辑" : ($options['op_type'] == 2 ? "删除" :($options['op_type'] == 3 ? "导出" :"新增"))); } + if(!array_key_exists("url",$options)){ + $options['url'] = MODULE_NAME."/".CONTROLLER_NAME."/".ACTION_NAME; + } //获取ip $addarray = [ "op_ip"=>$_SERVER['REMOTE_ADDR'],
*甲方公司类型: + + + *乙方公司类型: + + +
*甲方公司: + + + *乙方公司: + + +
*结算周期: @@ -188,7 +229,7 @@
是否有打款流程: - + @@ -211,7 +252,7 @@
结算生效期限: + - 结束时间不选默认永久 @@ -417,6 +458,73 @@ + + if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + {$key-0+1} {$com.company_name} {$com['statement_info'][0]['account']} - {$com['statement_info'][0]['game_list'][0]['game_name']} {$com['statement_info'][0]['game_list'][0]['game_type_name']} {$com['statement_info'][0]['time']}{$com['statement_info'][0]['game_list'][0]['pay_amount']} {$com['statement_info'][0]['game_list'][0]['refund']|default=0} {$com['statement_info'][0]['game_list'][0]['ratio']}% {$com['statement_info'][0]['game_list'][0]['increment_ratio']}% {$com['statement_info'][0]['game_list'][0]['sum_money']}{$com['statement_info'][0]['reward']||default="0"} {$com['statement_info'][0]['fine']||default="0"} {$com['statement_info'][0]['game_list'][0]['withhold']|default=0}
{$game['game_name']} {$game['game_type_name']}{$game['pay_amount']} {$game['refund']|default=0} {$game['ratio']}% {$game['increment_ratio']}% {$game['sum_money']}
{$account['time']|default="-----"} {$account['game_list'][0]['pay_amount']}{$account['game_list'][0]['refund']|default=0} {$account['game_list'][0]['ratio']}% {$account['game_list'][0]['increment_ratio']}%{$account['reward']|default=0} {$account['fine']|default=0} {$account['withhold_amount']|default=0}{$account['withhold_amount']|default=0} {$account['week_amount']}
{$game['game_name']} {$game['game_type_name']}{$game['pay_amount']}{$game['refund']|default=0} {$game['ratio']}% {$game['increment_ratio']}% {$game['sum_money']}
*推广公司类型:推广公司类型:
*推广公司:推广公司: {$data.agg_failed_amount}0{$data.agg_wm_failed_amount}0 {$data.agg_wm_amount} {$data.agg_wm_failed_amount}0 @@ -250,6 +251,7 @@ 'sdk_type'=>$_GET['sdk_type'], 'game_id'=>$data['game_id'], 'game_name'=>$data['game_name'], + 'channel_type'=>2, 'partner_id'=>$_REQUEST['partner_id'] ])}">{$data.agg_amount} {$data.agg_failed_amount}0