From 31af865a9f80123c30a7997d8c4aae7d0386186f Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 26 Aug 2020 16:46:17 +0800 Subject: [PATCH 01/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BA=BF=E4=B8=8B?= =?UTF-8?q?=E6=89=93=E6=AC=BE=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementOfflineController.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementOfflineController.class.php b/Application/Admin/Controller/CompanyStatementOfflineController.class.php index c9b44d4f3..bd559b24c 100644 --- a/Application/Admin/Controller/CompanyStatementOfflineController.class.php +++ b/Application/Admin/Controller/CompanyStatementOfflineController.class.php @@ -114,11 +114,15 @@ class CompanyStatementOfflineController extends ThinkController //获取所有的母单id $companyStatementInfo = M("company_statement_info","tab_"); $statementPool = $companyStatementInfo->where("id in ($ids) and pay_status <> 1")->field("pool_id,count(id) count")->group("pool_id")->select(); - $poolInfo = []; + $yPoolInfo = []; foreach ($statementPool as $k => $v) { - $poolInfo[$v['pool_id']] = $v['count']; + $yPoolInfo[$v['pool_id']] = $v['count']; } unset($statementPool); + + //获取母单未支付完成订单 + $poolIds = implode(",",array_keys($yPoolInfo)); + $poolInfo = $companyStatementInfo->where("pool_id in ($poolIds) and pay_status <> 1")->field("pool_id,count(id) count")->group("pool_id")->select(); //修改info $saveData = [ @@ -127,15 +131,11 @@ class CompanyStatementOfflineController extends ThinkController "pay_info"=>json_encode(["payment_user"=>$_SESSION['onethink_admin']['user_auth']["username"],"payment_time"=>date("Y-m-d H:i:s")]) ]; $ires = $companyStatementInfo->where("id in ($ids)")->save($saveData); - - //获取母单未支付完成订单 - $poolIds = implode(",",array_keys($poolInfo)); - $poolInfo = $companyStatementInfo->where("pool_id in ($poolIds) and pay_status <> 1")->field("pool_id,count(id) count")->group("pool_id")->select(); //全部就打款成功,否则打款中 $companyStatementPool = M("company_statement_pool","tab_"); foreach ($poolInfo as $k => $v) { - if($v['count'] == $poolInfo[$v['pool_id']]){ + if($v['count'] == $yPoolInfo[$v['pool_id']]){ //打款成功 $this->setOneVerifyStatus(4,"payment",$v['pool_id']); }else{ From a18e4188bda26770d2f20c20f1c74ece40e018f0 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 27 Aug 2020 14:48:54 +0800 Subject: [PATCH 02/82] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/FinanceController.class.php | 10 +++++---- Application/Admin/View/Finance/aggDetail.html | 22 +++++++++---------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 8c6db5e2e..6385a9579 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -881,7 +881,7 @@ class FinanceController extends ThinkController $account = I('account', ''); $gameId = I('game_id', 0); - $game = M('game', 'tab_')->field(['id', 'unique_code', 'game_name'])->where(['game_id' => $gameId])->find(); + $game = M('game', 'tab_')->field(['id', 'unique_code', 'game_name', 'sdk_version'])->where(['id' => $gameId])->find(); $client = new AggregateClient(); $result = $client->api('game-recharge-detail', [ @@ -891,15 +891,15 @@ class FinanceController extends ThinkController 'account' => $account, 'order_number' => $orderNumber, 'role_name' => $roleName, - 'device_type' => I("sdk_type", 0), + 'device_type' => $game['sdk_version'], 'page' => $p, 'limit' => $limit, ]); - + $count = 0; $total = '0.00'; $records = []; - if ($result['code'] != '0000') { + if ($result['code'] == '0000') { $count = $result['data']['count']; $total = $result['data']['total']; $records = $result['data']['records']; @@ -907,6 +907,7 @@ class FinanceController extends ThinkController foreach ($records as $key => $record) { $records[$key]['game_name'] = $game['game_name']; + $records[$key]['rom_platform'] = $record['rom_platform'] == 'android' ? '安卓' : 'IOS'; } if(isset($_REQUEST['export'])){ @@ -931,6 +932,7 @@ class FinanceController extends ThinkController $this->assign('_page', $page); } + $this->assign('game', $game); $this->assign('pagination', $page); $this->assign('total', $total); $this->assign('records', $records); diff --git a/Application/Admin/View/Finance/aggDetail.html b/Application/Admin/View/Finance/aggDetail.html index 4edc6edd5..a727da166 100644 --- a/Application/Admin/View/Finance/aggDetail.html +++ b/Application/Admin/View/Finance/aggDetail.html @@ -30,7 +30,7 @@ @@ -71,7 +71,7 @@
- 搜索 @@ -116,20 +116,20 @@ - {$data.order_number} - {$data.pay_success_time} - {$data.account} - {$data.game_name} - {$data.rom_platform} + {$record.order_number} + {$record.pay_success_time} + {$record.account} + {$record.game_name} + {$record.rom_platform} 聚合 - - {$data.role_name} - {$data.money} + + {$record.cp_role_name} + {$record.money} 总计 - 累计充值:{$total}0 + 累计充值:{$total}0 From 1a55fbce6980bd8932d50f0ffe6b74ccab2a91c8 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 27 Aug 2020 16:07:17 +0800 Subject: [PATCH 03/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E7=BB=93=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/CompanyStatementSetController.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 2afc95983..b9a727586 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -1196,6 +1196,7 @@ class CompanyStatementSetController extends Controller { } //聚合未结算数据 $lsres = $LackStatement->where("company_id='{$k}' and is_pool = 0")->select(); + // dd($lsres); $del_lack_ids = []; if(count($lsres) > 0){ @@ -1213,9 +1214,9 @@ class CompanyStatementSetController extends Controller { foreach($t_statement_info as $p=>$info){ $statement_info[$info['account']] = $info['game_list']; } - foreach($v['statement_info'] as $p=>&$info){ + foreach($v['statement_info'] as $p=>$info){ if(isset($statement_info[$info['account']])){ - $info['game_list'] = array_merge($statement_info[$info['account']],$info['game_list']); + $v['statement_info'][$p]['game_list'] = array_merge($statement_info[$info['account']],$v['statement_info'][$p]['game_list']); unset($statement_info[$info['account']]); } } @@ -1226,7 +1227,6 @@ class CompanyStatementSetController extends Controller { } } } - if($type == 2 && $v['statement_money'] == 0){ //补点不存 }else{ From f405faa924186a9eef2964ccf10fd063da2ad65b Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 27 Aug 2020 16:37:09 +0800 Subject: [PATCH 04/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E6=B1=87=E6=80=BB=E5=AF=BC=E5=87=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementPoolController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 25d7cecc0..2c27dcf92 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -288,7 +288,7 @@ class CompanyStatementPoolController extends ThinkController if($is_export){ if($v['withdraw_type'] != 3) { - $v['statement_money'] .="N{$cline}-O{$cline}"; + $v['statement_money'] .="O{$cline}-P{$cline}"; } else { $v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1); } From eb2cd7d50ffae29362e9aef10e7ade2be7b07391 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 27 Aug 2020 16:45:33 +0800 Subject: [PATCH 05/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B4=A2=E5=8A=A1?= =?UTF-8?q?=E6=B1=87=E6=80=BB=E6=B5=8B=E8=AF=95=E6=94=B6=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinancialSummarySetController.class.php | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Application/Admin/Controller/FinancialSummarySetController.class.php b/Application/Admin/Controller/FinancialSummarySetController.class.php index 739dc1299..2720c987e 100644 --- a/Application/Admin/Controller/FinancialSummarySetController.class.php +++ b/Application/Admin/Controller/FinancialSummarySetController.class.php @@ -196,38 +196,38 @@ class FinancialSummarySetController extends \Think\Controller "type"=>1, "sort"=>5 ); - //获取测试白名单 - $testlist = M("TestWhiteList",'tab_')->field("user_id")->select(); - if($testlist){ - $testlist = implode(",",array_column($testlist, 'user_id')); - }else{ - $testlist = false; - } - //获取现金充值 - $map = array( - "payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)), - "pay_status"=>1, - "pay_way"=>array("GT",0) - ); - if($testlist) $map['user_id']=array("in",$testlist); - $cash_spend = $this->SpendModel - ->field("IFNULL(SUM(pay_amount),0) as pay_amount") - ->where($map) - ->find()['pay_amount']; - //获取平台币充值 - $map1 = array( - "payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)), - "pay_status"=>1 - ); - if($testlist) $map1['user_id']=array("in",$testlist); - $deposit = $this->DepositModel->field("IFNULL(sum(pay_amount),0) pay_amount")->where($map1)->find()['pay_amount']; + // //获取测试白名单 + // $testlist = M("TestWhiteList",'tab_')->field("user_id")->select(); + // if($testlist){ + // $testlist = implode(",",array_column($testlist, 'user_id')); + // }else{ + // $testlist = false; + // } + // //获取现金充值 + // $map = array( + // "payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)), + // "pay_status"=>1, + // "pay_way"=>array("GT",0) + // ); + // if($testlist) $map['user_id']=array("in",$testlist); + // $cash_spend = $this->SpendModel + // ->field("IFNULL(SUM(pay_amount),0) as pay_amount") + // ->where($map) + // ->find()['pay_amount']; + // //获取平台币充值 + // $map1 = array( + // "payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)), + // "pay_status"=>1 + // ); + // if($testlist) $map1['user_id']=array("in",$testlist); + // $deposit = $this->DepositModel->field("IFNULL(sum(pay_amount),0) pay_amount")->where($map1)->find()['pay_amount']; //测试订单录入 $map2 = array( "pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)) ); $test_pay_amount = $this->TestOrderModel->where($map2)->field("IFNULL(sum(pay_amount),0) pay_amount")->find()['pay_amount']; - $temparr['sum_money'] = number_format(($cash_spend*100 + $deposit*100 + $test_pay_amount*100 )/100, 2, '.', ''); + $temparr['sum_money'] = number_format(($test_pay_amount*100 )/100, 2, '.', ''); $this->adddata[]=$temparr; } From 3c3222ad26462792fc01f151e3cc184732ecacc2 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 27 Aug 2020 16:57:46 +0800 Subject: [PATCH 06/82] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 77 +++++++++++-------- .../Controller/FinanceController.class.php | 5 +- .../Controller/TestOrderController.class.php | 38 ++++++--- .../Admin/View/Finance/gameStatistics.html | 2 +- Application/Admin/View/TestOrder/lists.html | 14 +++- 5 files changed, 89 insertions(+), 47 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index aed2f929e..7f5c1709f 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2468,18 +2468,25 @@ class ExportController extends Controller array('sdk_version', '设备名称'), array('order_amount', '订单金额'), array('pay_amount', '实付金额'), + array('platform_type', '所属平台'), array('pay_way', '充值方式'), array('merchant_id', '所属商户'), array('add_time', '录入时间'), ); $params = I('get.'); - // if(isset($params['timestart']) && isset($params['timeend'])) { - // $startTime = strtotime($params['timestart']); - // $endTime = strtotime($params['timeend']) + 86399; - // $map['tab_test_order.pay_time'] = array('BETWEEN', [$startTime, $endTime]); - // } + $platformType = I('platform_type', 0); + $startedAt = I('timestart', ''); + $endedAt = I('timeend', ''); + $gameId = I('game_id', 0); + $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->select(); + $gameSets = index_by_column('game_id', $gameSets); + $aggGameIds = getAggExceptIds($gameSets); + + $map = []; + $map['_string'] = '1=1'; + if(isset($params['server_type'])) { $map['t.server_type'] = $params['server_type']; } @@ -2499,18 +2506,23 @@ class ExportController extends Controller if(isset($params['pay_way'])) { $map['t.pay_way'] = $params['pay_way']; } - - if(!empty($params['timestart']) && !empty($params['timeend'])){ - $timestart = strtotime($params['timestart']); - $timeend = strtotime($params['timeend'])+86399; - $map['t.pay_time'] = array("between",array($timestart,$timeend)); - }else if(!empty($params['timestart']) && empty($params['timeend'])) { - $timestart = strtotime($params['timestart']); - $map['t.pay_time'] = array("EGT",$timestart); - }else if (!empty($params['timeend']) && empty($params['timestart'])) { - $timeend = strtotime($params['timeend'])+86399; - $map['t.pay_time'] = array("ELT",$timeend); + + if ($startedAt != '') { + $map['_string'] .= ' and pay_time>=' . strtotime($startedAt . ' 00:00:00'); + } + if ($endedAt != '') { + $map['_string'] .= ' and pay_time<=' . strtotime($endedAt . ' 23:59:59'); } + if ($platformType == 1) { + $map['_string'] .= ' and game_id not in(' . implode(',', $aggGameIds) . ')'; + } + if ($platformType == 2) { + $map['_string'] .= ' and game_id in(' . implode(',', $aggGameIds) . ')'; + } + if ($gameId != 0) { + $map['_string'] .= ' and game_id=' . $gameId; + } + if ($_REQUEST['merchant_id']) { $map['merchant_id'] = $_REQUEST['merchant_id']; unset($_REQUEST['merchant_id']); @@ -2530,6 +2542,7 @@ class ExportController extends Controller }else { $order_list['server_type'] = '测试外网'; } + $order_list['platform_type'] = in_array($v['game_id'], $aggGameIds) ? '聚合' : '联运'; $order_list['game_name'] =clearGameNameType($v['game_name']); $order_list['sdk_version'] =getGameTypeName($v['sdk_version']); $order_list['order_type'] = get_order_type($v['order_type']); @@ -8328,8 +8341,8 @@ class ExportController extends Controller } return false; }); - - $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->where(['game_id' => ['in', $gameIds]])->select(); + + $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->select(); $gameSets = index_by_column('game_id', $gameSets); $searchGameCodes = []; @@ -8342,6 +8355,7 @@ class ExportController extends Controller $searchGameCodes = M('game', 'tab_')->where(['id' => ['in', $searchGameIds], 'unique_code' => ['neq', '']])->getField('unique_code', true); $searchGameCodes = array_unique($searchGameCodes); $testWhere['game_id'] = ['in', $searchGameIds]; + $testRows = M('test_order', 'tab_') ->field(['game_id', 'sum(pay_amount) amount']) ->where($testWhere) @@ -8373,6 +8387,7 @@ class ExportController extends Controller } $exceptIds = getAggExceptIds($gameSets); + foreach ($xlsData as $key => $value) { $aggAmount = '0.00'; $aggFailAmount = '0.00'; @@ -8384,7 +8399,6 @@ class ExportController extends Controller } $xlsData[$key]['agg_amount'] = $aggAmount; $xlsData[$key]['agg_failed_amount'] = $aggFailAmount; - $xlsData[$key]['agg_failed_amount'] = '0.00'; if (isset($gameSets[$value['game_id']]) && isAggGame($gameSets[$value['game_id']]['pay_notify_url'])) { $xlsData[$key]['cash_count'] = $value['cash_count'] = 0; $xlsData[$key]['balance_coin_count'] =$value['balance_coin_count'] = 0; @@ -8411,6 +8425,7 @@ class ExportController extends Controller } $testWhere['_string'] .= ' and game_id in(' . implode(',', $exceptIds) . ')'; + $testAllAmount = M('test_order', 'tab_')->where($testWhere)->sum('pay_amount'); $totalData = D("spend")->totalGameStatistics($map); @@ -8420,17 +8435,19 @@ class ExportController extends Controller $sumInside = $totalData['inside_cash_count']; $sumNoticeFail = $totalData['notice_fail_count']? $totalData['notice_fail_count']:0; $sumAll = $sumCash + $sumBalance + $sumInside; - - $sumData = [['game_name'=>'总计', - 'cash_count'=>$sumCash, - 'balance_coin_count'=>$sumBalance, - 'inside_cash_count'=>$sumInside, - 'all_cash_count'=>$sumAll, - 'notice_fail_count'=>$sumNoticeFail, - 'agg_amount' => $aggTotal, - 'testAllAmount' => $testAllAmount, - 'aggFailTotal' => $aggFailTotal, - ]]; + $sumData = [ + [ + 'game_name'=>'总计', + 'cash_count'=>$sumCash, + 'balance_coin_count'=>$sumBalance, + 'inside_cash_count'=>$sumInside, + 'all_cash_count'=>$sumAll, + 'notice_fail_count'=>$sumNoticeFail, + 'agg_amount' => $aggTotal, + 'test_amount' => round(floatval($testAllAmount), 2), + 'agg_failed_amount' => $aggFailTotal, + ] + ]; $xlsData = array_merge($xlsData,$sumData); $this->exportAddOperationLog("Finance/gameStatistics","充值-财务管理-游戏统计-导出"); $this->exportExcel($xlsName, $xlsCell, $xlsData); diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 6385a9579..516b47bb0 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -768,6 +768,7 @@ class FinanceController extends ThinkController $searchGameCodes = array_unique($searchGameCodes); $testWhere['game_id'] = ['in', $searchGameIds]; + $testRows = M('test_order', 'tab_') ->field(['game_id', 'sum(pay_amount) amount']) ->where($testWhere) @@ -830,7 +831,7 @@ class FinanceController extends ThinkController } $this->checkListOrCountAuthRestMap($map,[]); - + $testWhere['_string'] .= ' and game_id in(' . implode(',', $exceptIds) . ')'; $testAllAmount = M('test_order', 'tab_')->where($testWhere)->sum('pay_amount'); @@ -895,7 +896,7 @@ class FinanceController extends ThinkController 'page' => $p, 'limit' => $limit, ]); - + $count = 0; $total = '0.00'; $records = []; diff --git a/Application/Admin/Controller/TestOrderController.class.php b/Application/Admin/Controller/TestOrderController.class.php index 638f3c3e1..6fd00d6fb 100644 --- a/Application/Admin/Controller/TestOrderController.class.php +++ b/Application/Admin/Controller/TestOrderController.class.php @@ -13,6 +13,10 @@ class TestOrderController extends ThinkController $page = intval($p); $page = $page ? $page : 1; //默认显示第一页数据 $arraypage = $page; + $platformType = I('platform_type', 0); + $startedAt = I('timestart', ''); + $endedAt = I('timeend', ''); + $gameId = I('game_id', 0); if (isset($_REQUEST['row'])) { $row = $_REQUEST['row']; @@ -20,7 +24,12 @@ class TestOrderController extends ThinkController $row = 10; } + $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->select(); + $gameSets = index_by_column('game_id', $gameSets); + $aggGameIds = getAggExceptIds($gameSets); + $map['1'] = "1"; + $map['_string'] = '1=1'; if (!empty($_REQUEST['server_type'])) { $map['t.server_type'] = $_REQUEST['server_type']; } @@ -36,16 +45,20 @@ class TestOrderController extends ThinkController if (!empty($_REQUEST['pay_way'])) { $map['pay_way'] = $_REQUEST['pay_way']; } - if(!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])){ - $timestart = strtotime($_REQUEST['timestart']); - $timeend = strtotime($_REQUEST['timeend'])+86399; - $map['pay_time'] = array("between",array($timestart,$timeend)); - }else if(!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) { - $timestart = strtotime($_REQUEST['timestart']); - $map['pay_time'] = array("EGT",$timestart); - }else if (!empty($_REQUEST['timeend']) && empty($_REQUEST['timestart'])) { - $timeend = strtotime($_REQUEST['timeend'])+86399; - $map['pay_time'] = array("ELT",$timeend); + if ($startedAt != '') { + $map['_string'] .= ' and pay_time>=' . strtotime($startedAt . ' 00:00:00'); + } + if ($endedAt != '') { + $map['_string'] .= ' and pay_time<=' . strtotime($endedAt . ' 23:59:59'); + } + if ($platformType == 1) { + $map['_string'] .= ' and game_id not in(' . implode(',', $aggGameIds) . ')'; + } + if ($platformType == 2) { + $map['_string'] .= ' and game_id in(' . implode(',', $aggGameIds) . ')'; + } + if ($gameId != 0) { + $map['_string'] .= ' and game_id=' . $gameId; } if ($_REQUEST['merchant_id']) { $map['merchant_id'] = $_REQUEST['merchant_id']; @@ -56,8 +69,9 @@ class TestOrderController extends ThinkController ->join("tab_game g on t.game_id = g.id","left") ->where($map)->page($page,$row)->order('add_time desc')->select(); foreach ($order_list as $k => &$v) { - $v['game_name'] =clearGameNameType($v['game_name']); - $v['sdk_version'] =getGameTypeName($v['sdk_version']); + $v['game_name'] = clearGameNameType($v['game_name']); + $v['sdk_version'] = getGameTypeName($v['sdk_version']); + $v['platform_type'] = in_array($v['game_id'], $aggGameIds) ? '聚合' : '联运'; } $sum_order_amount = M('test_order', 'tab_')->alias("t")->where($map)->field('sum(order_amount) as sum_order_amount,count(1) as count')->find(); $sum_pay_amount = M('test_order', 'tab_')->alias("t")->where($map)->field('sum(pay_amount) as sum_order_amount')->find(); diff --git a/Application/Admin/View/Finance/gameStatistics.html b/Application/Admin/View/Finance/gameStatistics.html index 099228a5b..f943c8e6c 100644 --- a/Application/Admin/View/Finance/gameStatistics.html +++ b/Application/Admin/View/Finance/gameStatistics.html @@ -256,7 +256,7 @@ {$sumNoticeFail}0 {$aggTotal} {$testAllAmount}0 - {$aggFailTotal}0 + {$aggFailTotal}0 + +
搜索 @@ -135,6 +141,8 @@ 订单金额 实付金额 + + 所属平台 充值方式 @@ -154,7 +162,7 @@ - aOh! 暂时还没有内容! + aOh! 暂时还没有内容! @@ -170,6 +178,7 @@ {$data.sdk_version} {$data.order_amount} {$data.pay_amount} + {$data.platform_type} {$data.pay_way|get_pay_way} {:getMerchantName($data['merchant_id'])} {$data.add_time|date='Y-m-d H:i:s',###} @@ -191,6 +200,7 @@ ------ ------ ------ + ------ From 619e1de3f3ecc2235366e320e28f405bd60e9418 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 27 Aug 2020 18:16:28 +0800 Subject: [PATCH 07/82] =?UTF-8?q?=E7=95=99=E5=AD=98=E7=8E=87=E4=B8=8D?= =?UTF-8?q?=E5=8C=BA=E5=88=86=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/ExportController.class.php | 17 ++++++++++------- .../Admin/Controller/StatController.class.php | 17 ++++++++++------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 7f5c1709f..2ca2a0fc4 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -4070,20 +4070,23 @@ class ExportController extends Controller $error = '请选择游戏!'; $status = false; } - if ($deviceType == '') { - $error = '请选择设备类型!'; - $status = false; - } $startTime = strtotime($start . ' 00:00:00'); $endTime = strtotime($end . ' 23:59:59') + 1; if ((($endTime - $startTime)/(24*3600)) > 31) { $error = '时间间隔不能超过31天'; $status = false; } + $searchGameId = 0; if ($status) { $baseGame = M('base_game', 'tab_')->where(['id' => $baseGameId])->find(); - $gameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id']; + $gameIds = []; + if ($deviceType) { + $searchGameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id']; + $gameIds[] = $searchGameId; + } else { + $gameIds = [$baseGame['android_game_id'], $baseGame['ios_game_id']]; + } $client = new Client([ 'base_uri' => C('TASK_URL'), @@ -4095,7 +4098,7 @@ class ExportController extends Controller 'start_time' => $start, 'end_time' => $end, 'promote_id' => I('promote_id', 0), - 'game_id' => $gameId, + 'game_ids' => $gameIds, ] ]); @@ -4104,7 +4107,7 @@ class ExportController extends Controller if (!$result) { $this->error('数据请求异常!'); } - $gameName = get_game_name($gameId); + $gameName = $deviceType ? get_game_name($searchGameId) : $baseGame['name']; $promoteName = '全部'; if ($promoteId) { $promoteName = get_promote_account($promoteId); diff --git a/Application/Admin/Controller/StatController.class.php b/Application/Admin/Controller/StatController.class.php index bb95ec29d..a085d0296 100644 --- a/Application/Admin/Controller/StatController.class.php +++ b/Application/Admin/Controller/StatController.class.php @@ -167,20 +167,23 @@ class StatController extends ThinkController $error = '请选择游戏!'; $status = false; } - if ($deviceType == '') { - $error = '请选择设备类型!'; - $status = false; - } $startTime = strtotime($start . ' 00:00:00'); $endTime = strtotime($end . ' 23:59:59') + 1; if ((($endTime - $startTime)/(24*3600)) > 31) { $error = '时间间隔不能超过31天'; $status = false; } + $searchGameId = 0; if ($status) { $baseGame = M('base_game', 'tab_')->where(['id' => $baseGameId])->find(); - $gameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id']; + $gameIds = []; + if ($deviceType) { + $searchGameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id']; + $gameIds[] = $searchGameId; + } else { + $gameIds = [$baseGame['android_game_id'], $baseGame['ios_game_id']]; + } $client = new Client([ 'base_uri' => C('TASK_URL'), @@ -192,7 +195,7 @@ class StatController extends ThinkController 'start_time' => $start, 'end_time' => $end, 'promote_id' => I('promote_id', 0), - 'game_id' => $gameId, + 'game_ids' => $gameIds, ] ]); @@ -203,7 +206,7 @@ class StatController extends ThinkController } $data = $result['data']['records']; $dayList = [1, 2, 3, 4, 5, 6, 7, 15, 30]; - $gameName = get_game_name($gameId); + $gameName = $deviceType ? get_game_name($searchGameId) : $baseGame['name']; $promoteName = '全部'; if ($promoteId) { $promoteName = get_promote_account($promoteId); From 0ff1089682e65a73ed0952a74e007296dedeaa16 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 27 Aug 2020 19:38:28 +0800 Subject: [PATCH 08/82] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/DepositController.class.php | 46 ++----------------- Application/Admin/View/Deposit/lists.html | 2 +- 2 files changed, 6 insertions(+), 42 deletions(-) diff --git a/Application/Admin/Controller/DepositController.class.php b/Application/Admin/Controller/DepositController.class.php index 8034efa3d..483bdbbef 100644 --- a/Application/Admin/Controller/DepositController.class.php +++ b/Application/Admin/Controller/DepositController.class.php @@ -71,7 +71,8 @@ class DepositController extends ThinkController { } unset($_REQUEST['pay_way']); } - if ($_REQUEST['merchant_id']) { + + if ($_REQUEST['merchant_id'] && $_REQUEST['merchant_id'] != 0) { $map['merchant_id'] = $_REQUEST['merchant_id']; unset($_REQUEST['merchant_id']); } @@ -92,46 +93,9 @@ class DepositController extends ThinkController { $map1=$map; $map1['pay_status']=1; -// if($_REQUEST['promote_id']||$_REQUEST['promote_id']=='0') { -// $page = intval($p); -// $page = $page ? $page : 1; //默认显示第一页数据 -// if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} -// $map1['order_status'] = 1; -// unset($map1['pay_status']); -// if ($map['pay_status']) { -// $map['order_status']=$map['pay_status']; -// } -// -// $total=null_to_0(D('coin_pay_order')->where($map1)->sum('pay_amount')); -// $ttotal=null_to_0(D('coin_pay_order')->where('create_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount')); -// $ytotal=null_to_0(D('coin_pay_order')->where('create_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount')); -// $this->assign('total',$total); -// $this->assign('ttotal',$ttotal); -// $this->assign('ytotal',$ytotal); -// -// $data = D('coin_pay_order') -// /* 查询指定字段,不指定则查询所有字段 */ -// ->field('*,order_status as pay_status') -// // 查询条件 -// ->where($map) -// /* 默认通过id逆序排列 */ -// ->order("id desc") -// /* 数据分页 */ -// ->page($page, $row) -// /* 执行查询 */ -// ->select(); -// -// /* 查询记录总数 */ -// $count = D('coin_pay_order')->where($map)->count(); -// -// $page = set_pagination($count,$row); -// if($page) {$this->assign('_page', $page);} -// -// $this->assign('list_data', $data); -// $this->meta_title = '平台币充值列表'; -// $this->display('lists');die(); -// } $this->checkListOrCountAuthRestMap($map,[]); + + $total=null_to_0(D(self::model_name)->where($map1)->sum('pay_amount')); $ttotal=null_to_0(D(self::model_name)->where('create_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount')); $ytotal=null_to_0(D(self::model_name)->where('create_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount')); @@ -145,7 +109,7 @@ class DepositController extends ThinkController { $this->assign("is_admin",is_administrator()); $show_data_power = (is_administrator()|| session('user_auth')['show_data']); $this->assign('show_data_power', $show_data_power); - parent::lists(self::model_name,$_GET["p"],$map); + parent::lists(self::model_name, $_GET["p"], $map); } public function lists_secord() { diff --git a/Application/Admin/View/Deposit/lists.html b/Application/Admin/View/Deposit/lists.html index 8b9a258d9..99256ec9d 100644 --- a/Application/Admin/View/Deposit/lists.html +++ b/Application/Admin/View/Deposit/lists.html @@ -83,7 +83,7 @@
@@ -131,6 +133,7 @@ +
From 9d67a4c84247a51b3a1306442e019636f1d50812 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 28 Aug 2020 11:11:11 +0800 Subject: [PATCH 15/82] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PromoteController.class.php | 15 +++++++++++++++ .../Base/Service/PromoteCompanyService.class.php | 6 +++--- Application/Base/Service/PromoteService.class.php | 10 ++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 2e9ea118f..58900f04d 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -7,6 +7,7 @@ use User\Api\UserApi; use Org\XiguSDK\Xigu; use Base\Service\PromoteService; use Base\Service\ApplyService; +use Base\Service\PromoteCompanyService; /** * 后台首页控制器 @@ -276,6 +277,13 @@ class PromoteController extends ThinkController if ($this->accountExist($account)) { $this->error('该账号已存在'); } + + $promoteCompanyService = new PromoteCompanyService(); + $verifyingPromotes = $promoteCompanyService->getVerifyingPromotes(); + if ($promoteCompanyService->isExistVerifyingPromoteAccount([$account], $verifyingPromotes)) { + $this->error('该账号已存在'); + } + if(!empty($mobile_phone)){ //判断手机格式 if (!preg_match("/^1[3456789]{1}\d{9}$/", $mobile_phone)) { @@ -407,6 +415,13 @@ class PromoteController extends ThinkController if ($this->accountExist($data['account'], $_POST['id'])) { $this->error('该账号已存在'); } + + $promoteCompanyService = new PromoteCompanyService(); + $verifyingPromotes = $promoteCompanyService->getVerifyingPromotes(); + if ($promoteCompanyService->isExistVerifyingPromoteAccount([$data['account']], $verifyingPromotes)) { + $this->error('该账号已存在'); + } + $company_id = I('company_id'); if ($company_id <0 && $promote['level'] ==1) { $this->error('请选择推广公司'); diff --git a/Application/Base/Service/PromoteCompanyService.class.php b/Application/Base/Service/PromoteCompanyService.class.php index 04ee39297..6ab981e6d 100644 --- a/Application/Base/Service/PromoteCompanyService.class.php +++ b/Application/Base/Service/PromoteCompanyService.class.php @@ -258,8 +258,8 @@ class PromoteCompanyService if($isChangeBelong || $isChangeRelation ) { $data = array( - 'company_belong' => $save['company_belong'], - 'company_relation' => $save['develop_type'] + 'company_belong' => $companyInfo['company_belong'], + 'company_relation' => $companyInfo['develop_type'] ); M('promote', 'tab_')->where(['company_id' => $companyId])->save($data); @@ -268,7 +268,7 @@ class PromoteCompanyService $authGroup = M('auth_group', 'sys_')->where(['title'=>'市场总监'])->find(); $subPromoteIds = M('promote', 'tab_')->where(['level' => 1, 'company_id' => $companyId])->getField('id', true); $dataPresident = explode(',', $authGroup['data_president']); - if ($save['company_belong'] == 1 || $save['company_belong'] == 2) { + if ($companyInfo['company_belong'] == 1 || $companyInfo['company_belong'] == 2) { $dataPresident = array_unique(array_merge($dataPresident, $subPromoteIds)); } else { $dataPresident = array_diff($dataPresident, $subPromoteIds); diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index 542212cd5..39236b921 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -973,6 +973,16 @@ class PromoteService { 'message' => '渠道账号已存在', ]; } + + $promoteCompanyService = new PromoteCompanyService(); + $verifyingPromotes = $promoteCompanyService->getVerifyingPromotes(); + if ($promoteCompanyService->isExistVerifyingPromoteAccount([$account], $verifyingPromotes)) { + return [ + 'status' => false, + 'message' => '渠道账号已存在', + ]; + } + return [ 'status' => true, 'message' => '验证成功', From 175b2f92f7168203cee4337b2c2dce4d6bc4a038 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Aug 2020 11:42:00 +0800 Subject: [PATCH 16/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E5=B8=81=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/FinancialSummary/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/FinancialSummary/index.html b/Application/Admin/View/FinancialSummary/index.html index ea49c1fc8..7f0fb4525 100644 --- a/Application/Admin/View/FinancialSummary/index.html +++ b/Application/Admin/View/FinancialSummary/index.html @@ -72,9 +72,9 @@
From a29a8e43ff1b3f07430bd622c19c2fe4a215de45 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Aug 2020 11:50:45 +0800 Subject: [PATCH 17/82] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9bug?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/TimingController.class.php | 67 ++++++++++++++----- 1 file changed, 52 insertions(+), 15 deletions(-) diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index 75e184324..0c872f7d6 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -762,33 +762,72 @@ class TimingController extends AdminController { * @param int $end_time * @return array */ - public function getSpecialComplement($start_time=0,$end_time =0) { + public function getSpecialComplement($start_time=0,$end_time =0,$promote_id = 0) { - $data = M("company_statement","tab_")->where("statement_begin_time<={$start_time} and statement_end_time<={$end_time} and withdraw_type=3 and company_type=2")->select(); + $data = M("company_statement","tab_")->where("statement_begin_time<={$start_time} and statement_end_time<={$end_time} and withdraw_type=3")->select(); $return = []; foreach ($data as $key => $value) { - $statement_info = json_decode($value['statement_info'],true); - foreach ($statement_info as $skey => $sval) { - $info = $sval['game_list']; - foreach ($info as $k => $v) { - // - if (isset($return[$statement_info['promote_id'].$v['relation_game_id']])) { - $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] = $v['sum_money']; - } else { - $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] += $v['sum_money']; + + if ($value['company_type'] == 2) { + + foreach ($statement_info as $skey => $sval) { + $info = $sval['game_list']; + foreach ($info as $k => $v) { + // + if (isset($return[$statement_info['promote_id'].$v['relation_game_id']])) { + $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] = $v['sum_money']; + } else { + $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] += $v['sum_money']; + } + } } + } else { + //判断公司比例是不是隶属于这个会长 + $compamy_info = M("promote","tab_")->where(['id'=>$promote_id,'company_id'=>$value['company_id']])->find(); + if ($compamy_info) { + foreach ($statement_info as $k => $v) { + $statement_begin_time = strtotime($v['statement_begin_time']); + $statement_end_time = strtotime($v['statement_end_time'])+86399; + $amount_time['tab_spend.pay_status'] = 1; + $amount_time['pay_way'] = ['egt',0]; + $amount_time['_string'] = "payed_time between {$statement_begin_time} and {$statement_end_time} and relation_game_id={$v['relation_game_id']}"; + + $dataAmount = M("spend","tab_") + ->field("pay_amount,relation_game_id,relation_game_name,payed_time,game_type_name,substring_index(substring_index(promote.`chain`,'/',2),'/',-1) promote_id,chain,admin_id") + ->join("left join tab_promote promote on tab_spend.promote_id=promote.id") + ->join("left join tab_game game on tab_spend.game_id=game.id") + ->where($amount_time) + ->select(false); + + $dataAmount = M()->table("({$dataAmount})a") + ->field("a.*,sum(pay_amount) pay_amount,promote.account,member.real_name") + ->join("left join tab_promote promote on promote_id=promote.id") + ->join("left join sys_member member on promote.admin_id=member.uid ") + ->where(['promote_id'=>$promote_id]) + ->group("promote_id") + ->find(); + + $return[$value['company_id']."-".$promote_id."-".$v['relation_game_id']] += ($dataAmount['pay_amount']*$v['increment_ratio'])/100; + } + } } + } return $return; } + public function test() { + $this->getSpecialComplement(strtotime(date("Y-m-1",strtotime("2020-07"))),strtotime(date("Y-m-t",strtotime("2020-07")))+86399,2259); + } + + // $admin_id = 0,$promote_id = 0,$company_id=0,$relation_game_id=0,$date ='',$pay_amount = 0 public function getCompanyGameRadio($admin_id = 0,$promote_id = 0,$company_id=0,$relation_game_id=0,$date ='',$pay_amount = 0) { // $company_id=273; @@ -1094,11 +1133,9 @@ class TimingController extends AdminController { //特殊补点 - if (!$specialPayAmount[$value['pay_time']]) { - $specialPayAmount[$value['pay_time']] = $this->getSpecialComplement(strtotime(date("Y-m-1",strtotime($value['pay_time']))),strtotime(date("Y-m-t",strtotime($value['pay_time'])))+86399); - } + $specialPayAmount[$value['pay_time']] = $this->getSpecialComplement(strtotime(date("Y-m-1",strtotime($value['pay_time']))),strtotime(date("Y-m-t",strtotime($value['pay_time'])))+86399,$value['promote_id']); - $specialAmount = $specialPayAmount[$value['pay_time']][$value['company_id']."-".$value['promote_id']."-".$value['relation_game_id']]?$specialPayAmount[$value['pay_time']][$value['promote_id']."-".$value['relation_game_id']]:0; + $specialAmount = $specialPayAmount[$value['pay_time']][$value['company_id']."-".$value['promote_id']."-".$value['relation_game_id']]?$specialPayAmount[$value['pay_time']][$value['company_id']."-".$value['promote_id']."-".$value['relation_game_id']]:0; //渠道费用 From ae9d7f7574a0a61801b6b6dc6bff803a5edfe0df Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Aug 2020 11:58:37 +0800 Subject: [PATCH 18/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=87=8D=E7=AE=97?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=9A=84=E5=87=BA=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinancialSummaryController.class.php | 6 ++++++ Application/Admin/Model/CmdTasksModel.class.php | 15 +++++++++++---- .../Admin/View/FinancialSummary/index.html | 6 ++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php index 4dd97fdc8..a286b1638 100644 --- a/Application/Admin/Controller/FinancialSummaryController.class.php +++ b/Application/Admin/Controller/FinancialSummaryController.class.php @@ -165,6 +165,12 @@ class FinancialSummaryController extends AdminController } public function menuAuth() { + + $isCan = D("CmdTasks")->isCanAddTask("FinancialSummary"); + if(!$isCan){ + return []; + } + $mentBtn = [ "updateStatement"=>"重算金额" ]; diff --git a/Application/Admin/Model/CmdTasksModel.class.php b/Application/Admin/Model/CmdTasksModel.class.php index c923c197b..b3f15a73e 100644 --- a/Application/Admin/Model/CmdTasksModel.class.php +++ b/Application/Admin/Model/CmdTasksModel.class.php @@ -43,10 +43,8 @@ class CmdTasksModel extends Model{ //插入任务 public function addTask($type,$params,$need_path=true) { - $task = $this->field("end_time")->where(['status'=>["in","0,1"],'type'=>$type])->order("id desc")->find(); - if(!empty($task)){ - return false; - } + if(!$this->isCanAddTask($type)) return false; + if($need_path){ if(IS_WIN){ $p = explode(':',ROOTTTTT); @@ -64,4 +62,13 @@ class CmdTasksModel extends Model{ ]; return $this->add($save); } + //验证任务 + public function isCanAddTask($type) + { + $task = $this->field("end_time")->where(['status'=>["in","0,1"],'type'=>$type])->order("id desc")->find(); + if(!empty($task)){ + return false; + } + return true; + } } \ No newline at end of file diff --git a/Application/Admin/View/FinancialSummary/index.html b/Application/Admin/View/FinancialSummary/index.html index 7f0fb4525..a1a4968aa 100644 --- a/Application/Admin/View/FinancialSummary/index.html +++ b/Application/Admin/View/FinancialSummary/index.html @@ -285,14 +285,16 @@ window.location.href = url; }); $("#updateStatement").on("click",function(){ - layer.confirm("新增结算需要花费2分钟左右时间,并且只上个月统计信息,无需结算请取消,上次重算时间【{$lastRecount}】",{title:false}, function(index){ + layer.confirm("重算需要花费2分钟左右时间,并且只统计上个月信息,无需重算请取消,上次重算时间【{$lastRecount}】",{title:false}, function(index){ $.ajax({ type: 'post', url: "{:U('updateStatement')}", data:{}, success: function(data) { if(data.success){ - layer.alert('添加重算任务成功,请2分钟后刷新查看'); + layer.alert('添加重算任务成功,请2分钟后刷新查看',function(){ + window.location.reload(); + }); }else{ layer.alert('添加任务失败,已有重算任务。请等待上个重算任务完成'); } From aef60b02d8db7f4fa81e26571f67a033fa342e79 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Aug 2020 14:34:55 +0800 Subject: [PATCH 19/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=E8=B7=9F=E9=9A=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PromoteCompanyController.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index fb6f58fd9..0a1b52ef9 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -377,9 +377,8 @@ class PromoteCompanyController extends ThinkController $v['company_id'] = M("promote_company","tab_")->add($company_info); }else{ //编辑 - - M("promote_company","tab_")->save($company_info); $this->changePromote($company_info); + M("promote_company","tab_")->save($company_info); } //业务逻辑 From 268e08424148770e0a3f8870a665e30f38995caa Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 28 Aug 2020 14:36:12 +0800 Subject: [PATCH 20/82] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PresidentDepositController.class.php | 3 ++- Application/Base/Service/PresidentDepositService.class.php | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/PresidentDepositController.class.php b/Application/Admin/Controller/PresidentDepositController.class.php index 4fc4d139d..3f071caaa 100644 --- a/Application/Admin/Controller/PresidentDepositController.class.php +++ b/Application/Admin/Controller/PresidentDepositController.class.php @@ -332,9 +332,10 @@ class PresidentDepositController extends ThinkController public function payConfirm() { $ids = I('ids', []); + $acceptTime = I('accept_time', date('Y-m-d')); try { $service = new PresidentDepositService(); - $service->batchPayConfirm($ids); + $service->batchPayConfirm($ids, $acceptTime); $this->ajaxReturn([ 'status' => 1, 'message' => '操作成功' diff --git a/Application/Base/Service/PresidentDepositService.class.php b/Application/Base/Service/PresidentDepositService.class.php index f31fdbe9a..9c29a7fdc 100644 --- a/Application/Base/Service/PresidentDepositService.class.php +++ b/Application/Base/Service/PresidentDepositService.class.php @@ -118,6 +118,7 @@ class PresidentDepositService private function update($params, $company, $record) { + $payType = $params['pay_type'] ?? 0; $payAcceptTime = $params['pay_accept_time'] == '' ? 0 : strtotime($params['pay_accept_time']); $refundTime = $params['refund_time'] == '' ? 0 : strtotime($params['pay_accept_time']); @@ -132,6 +133,7 @@ class PresidentDepositService $data['refund_time'] = $refundTime; } + $data['pay_way'] = $params['pay_type'] == 2 ? 4 : $params['pay_way']; $data['pay_type'] = $params['pay_type']; $data['pay_account'] = $params['pay_account']; @@ -139,7 +141,6 @@ class PresidentDepositService $data['payer'] = $params['payer']; $data['status'] = $status ?? $record['status']; $data['update_time'] = time(); - M('president_deposit', 'tab_')->where(['id' => $record['id']])->save($data); } @@ -207,7 +208,7 @@ class PresidentDepositService } } - public function batchPayConfirm(array $companyIds) + public function batchPayConfirm(array $companyIds, $acceptTime) { if (isMarketAdmin()) { throw new \Exception('无法操作记录'); @@ -231,7 +232,7 @@ class PresidentDepositService 'status' => 1, 'pay_confirm_time' => time(), 'update_time' => time(), - 'pay_accept_time' => strtotime(I('accept_time')) + 'pay_accept_time' => strtotime($acceptTime) ]); $companies = M('promote_company', 'tab_')->field(['company_name', 'id'])->where(['id' => ['in', $companyIds]])->select(); From eac0fc61c018d47aec7e5e8ba20214cd895e2521 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Aug 2020 14:59:16 +0800 Subject: [PATCH 21/82] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E5=88=86=E6=88=90=E9=87=91=E9=A2=9D=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 25d7cecc0..fb4052fea 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -351,11 +351,19 @@ class CompanyStatementPoolController extends ThinkController $va['d_statement_money'] = "=D{$line}*(F{$line})"; } }else{ - $va['d_statement_money'] = round($va['pay_amount']*($va['ratio']+$va['increment_ratio'])*(100-$va['fax_ratio'])/100/100,2); + if ($v['withdraw_type'] != 3) { + $va['d_statement_money'] = round($va['pay_amount']*($va['ratio']+$va['increment_ratio'])*(100-$va['fax_ratio'])/100/100,2); - $count['platform_amount'] += $va['pay_amount']; + $count['platform_amount'] += $va['pay_amount']; - $count['d_statement_money'] += $va['d_statement_money']; + $count['d_statement_money'] += $va['d_statement_money']; + } else { + $va['d_statement_money'] = round(($va['pay_amount']*($va['increment_ratio']))/100,2); + + $count['platform_amount'] += $va['pay_amount']; + + $count['d_statement_money'] += $va['d_statement_money']; + } } } $v['settlement_contact'] = $Partner[$v['company_id']]; From 19c7f7db0d2fc8fbf37312e3127535b1928c1333 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Aug 2020 15:18:16 +0800 Subject: [PATCH 22/82] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E4=B8=8B=E6=B8=B8=E7=BB=93=E7=AE=97=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/TimingController.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index 0c872f7d6..5e4b29704 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -1153,6 +1153,8 @@ class TimingController extends AdminController { //毛利 $promote_data[$key]['company_profit'] = $value['pay_amount']-$promote_data[$key]['cp_amount']-$promote_data[$key]['promote_amount']-$promote_data[$key]['channel_amount']-$promote_data[$key]['company_tax']-$specialAmount; + $promote_data[$key]['promote_amount'] += $specialAmount; + if ($value['promote_id'] == 0) { // $promote_data[$key]['promote_account']='官方渠道'; // $promote_data[$key]['company_id']='0'; From d123f7b7796d3115e693ee51f9c12c6e525f091c Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 28 Aug 2020 16:57:01 +0800 Subject: [PATCH 23/82] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/TestOrderController.class.php | 5 ++--- Application/Admin/View/Finance/gameStatistics.html | 10 +++++++++- Application/Admin/View/TestOrder/lists.html | 6 ++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/TestOrderController.class.php b/Application/Admin/Controller/TestOrderController.class.php index 6fd00d6fb..6ac73b078 100644 --- a/Application/Admin/Controller/TestOrderController.class.php +++ b/Application/Admin/Controller/TestOrderController.class.php @@ -14,10 +14,9 @@ class TestOrderController extends ThinkController $page = $page ? $page : 1; //默认显示第一页数据 $arraypage = $page; $platformType = I('platform_type', 0); - $startedAt = I('timestart', ''); - $endedAt = I('timeend', ''); + $startedAt = I('timestart', '') == '' ? I('start', '') : I('timestart', ''); + $endedAt = I('timeend', '') == '' ? I('end', '') : I('timeend', ''); $gameId = I('game_id', 0); - if (isset($_REQUEST['row'])) { $row = $_REQUEST['row']; } else { diff --git a/Application/Admin/View/Finance/gameStatistics.html b/Application/Admin/View/Finance/gameStatistics.html index f943c8e6c..52697204c 100644 --- a/Application/Admin/View/Finance/gameStatistics.html +++ b/Application/Admin/View/Finance/gameStatistics.html @@ -233,7 +233,15 @@ 'game_name'=>$data['game_name'], 'partner_id'=>$_REQUEST['partner_id'] ])}">{$data.agg_amount} - {$data.test_amount}0 + + {$data.test_amount} + {$data.agg_failed_amount}0 getCompanyRelation(2,$v['id']); $v["settlement_type"] = $tmpr['settlement_type']; $v["deposit_pay_type"] = $deposit ? $payTypes[$deposit['pay_type']] : '--'; + $v["deposit_status"] = $deposit ? $statusList[$deposit['status']] : '--'; + $v["deposit_amount"] = $deposit ? $deposit['amount'] : '--'; $v["collection"] = $tmpr['collection']; $v["invoice_type"] = $tmpr['invoice_type']; $v["invoice_content"] = $tmpr['invoice_content']; diff --git a/Application/Admin/View/Partner/add.html b/Application/Admin/View/Partner/add.html index c1e5b4ce2..9144f85ea 100644 --- a/Application/Admin/View/Partner/add.html +++ b/Application/Admin/View/Partner/add.html @@ -182,7 +182,7 @@ 开票内容: - + @@ -543,6 +543,14 @@ }); }) + $('#invoice_type').change(function () { + var val = $(this).val() + if (val == 0) { + $('#invoice_content').val('') + } else { + $('#invoice_content').val('信息服务费') + } + }) var PROMOTE = { juicerFun(){ var tpl =$("#doctpl").html(); diff --git a/Application/Admin/View/Partner/edit.html b/Application/Admin/View/Partner/edit.html index 69f69a181..15e5f56d1 100644 --- a/Application/Admin/View/Partner/edit.html +++ b/Application/Admin/View/Partner/edit.html @@ -545,6 +545,14 @@ }); }) + $('#invoice_type').change(function () { + var val = $(this).val() + if (val == 0) { + $('#invoice_content').val('') + } else { + $('#invoice_content').val('信息服务费') + } + }) var PROMOTE = { juicerFun(){ var tpl =$("#doctpl").html(); diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index fde262566..6ac99e0fb 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -171,7 +171,7 @@ @@ -183,7 +183,7 @@ @@ -196,8 +196,8 @@
@@ -378,7 +378,9 @@ @@ -409,7 +411,7 @@ 开票内容: - + @@ -1161,6 +1163,15 @@ } }) + $('#invoice_type').change(function () { + var val = $(this).val() + if (val == 0) { + $('#invoice_content').val('') + } else { + $('#invoice_content').val('信息服务费') + } + }) + $('#deposit-pay-type').change(function() { var val = $(this).val() if (val == 2) { diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index a2afbe70d..a48a2ef28 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -1029,6 +1029,16 @@ $('#deposit-pay-way').val('') } }) + + $('#invoice_type').change(function () { + var val = $(this).val() + if (val == 0) { + $('#invoice_content').val('') + } else { + $('#invoice_content').val('信息服务费') + } + }) + if ($('#deposit-pay-type').val() == 3) { $('.need-amount').hide(); } diff --git a/Application/Admin/View/PromoteCompany/export.html b/Application/Admin/View/PromoteCompany/export.html index d3c6e1a7d..aba4ea02d 100644 --- a/Application/Admin/View/PromoteCompany/export.html +++ b/Application/Admin/View/PromoteCompany/export.html @@ -39,13 +39,13 @@ 开发类型 公司性质 结算周期 - 押金 + 押金类型 + 押金金额 + 押金状态 + 会长账号 市场专员 - 押金 - 押金金额 - 押金状态 原包名 现包名 @@ -93,13 +93,15 @@ {$data.settlement_type} {$data.deposit_pay_type} + {$data.deposit_amount} + {$data.deposit_status} + {$data['list'][0]['account']|default="--"} {$data['list'][0]['market_admin_username']|default="--"} - - {$data['list'][0]['amount']|default="--"} - {$data['list'][0]['status']|default="--"} + + @@ -232,9 +234,8 @@ {$promote['account']|default="--"} {$promote['market_admin_username']|default="--"} - - {$promote['amount']|default="--"} - {$promote['status']|default="--"} + + {$promote['list'][0]['original_package_name']|default="--"} diff --git a/Application/Admin/View/PromoteCompany/lists.html b/Application/Admin/View/PromoteCompany/lists.html index 51b1c80d0..5f77a5672 100644 --- a/Application/Admin/View/PromoteCompany/lists.html +++ b/Application/Admin/View/PromoteCompany/lists.html @@ -154,7 +154,7 @@ 公司性质 是否
签署合同 结算周期 - 押金 + 押金类型 会长账号 市场专员 From 1e5c0cca661d5557ba0828b15080787a49f609c4 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 28 Aug 2020 17:51:44 +0800 Subject: [PATCH 25/82] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/PromoteCompany/add.html | 2 +- Application/Admin/View/PromoteCompany/edit.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index 6ac99e0fb..f6414308e 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -323,7 +323,7 @@ 开启 diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index a48a2ef28..f235cbf96 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -319,11 +319,11 @@ From bdc23b7d905174d41cea059f307d79557e836a10 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 28 Aug 2020 18:20:17 +0800 Subject: [PATCH 26/82] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 2 +- .../PromoteCompanyController.class.php | 8 +++++--- Application/Admin/View/Partner/add.html | 20 +++++++++---------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 0904b917b..22a2dbfa6 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2707,7 +2707,7 @@ function getMarketAdminsByPromoteIds($promoteIds) foreach ($topPromotes as $topPromote) { $topAdminMap[$topPromote['id']] = $topPromote['admin_id']; } - $admins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', array_column($topPromotes, 'admin_id')]])->select(); + $admins = M('member', 'sys_')->field(['uid id', 'nickname username', 'real_name'])->where(['id' => ['in', array_column($topPromotes, 'admin_id')]])->select(); $admins = index_by_column('id', $admins); foreach ($resultMap as &$row) { $adminId = $topAdminMap[$row['top_id']] ?? 0; diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 2ad732419..07517d3b3 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -125,8 +125,8 @@ class PromoteCompanyController extends ThinkController $v["settlement_type"] = $tmpr['settlement_type']; $v["deposit_pay_type"] = $deposit ? $payTypes[$deposit['pay_type']] : '--'; - $v["deposit_status"] = $deposit ? $statusList[$deposit['status']] : '--'; - $v["deposit_amount"] = $deposit ? $deposit['amount'] : '--'; + $v["deposit_status"] = !$deposit || $deposit['pay_type'] == PresidentDepositService::PAY_TYPE_NONE ? '--' : $statusList[$deposit['status']]; + $v["deposit_amount"] = $deposit ? $deposit['amount'] : 0; $v["collection"] = $tmpr['collection']; $v["invoice_type"] = $tmpr['invoice_type']; $v["invoice_content"] = $tmpr['invoice_content']; @@ -1398,13 +1398,15 @@ class PromoteCompanyController extends ThinkController ->select(); // dd($promoteres); $adminList = getMarketAdminsByPromoteIds(array_column($promoteres, 'id')); + if(empty($promoteres)){ //无会长 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) { - $v['market_admin_username'] = isset($adminList[$v['id']]) && $adminList[$v['id']]['admin'] ? $adminList[$v['id']]['admin']['username'] : '无'; + $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']) : '无'; if($ratio == false || empty($v['game_ids'])){ $v['row']=1; diff --git a/Application/Admin/View/Partner/add.html b/Application/Admin/View/Partner/add.html index 9144f85ea..867ac1120 100644 --- a/Application/Admin/View/Partner/add.html +++ b/Application/Admin/View/Partner/add.html @@ -151,7 +151,7 @@ @@ -162,8 +162,8 @@ @@ -172,8 +172,8 @@ *开票类型: @@ -182,7 +182,7 @@ 开票内容: - + @@ -203,8 +203,8 @@ *收款方: @@ -277,8 +277,8 @@ 是否有游戏资质: From b899ff7af759ef33543133e12dc9b9f36c7b6b85 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Aug 2020 18:37:20 +0800 Subject: [PATCH 27/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FinancialSummaryController.class.php | 2 +- Application/Admin/Model/PaymentMerchantModel.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php index a286b1638..5e598b42b 100644 --- a/Application/Admin/Controller/FinancialSummaryController.class.php +++ b/Application/Admin/Controller/FinancialSummaryController.class.php @@ -3,7 +3,7 @@ namespace Admin\Controller; class FinancialSummaryController extends AdminController { public $keyname=array( - "cash_spend"=>"现金充值收入", + "cash_spend"=>"游戏现金充值收入", "balance_coin_spend"=>"平台币消耗", "balance_coin_income"=>"平台币充值收入", "game_supersign_income"=>"超级签购买收入", diff --git a/Application/Admin/Model/PaymentMerchantModel.class.php b/Application/Admin/Model/PaymentMerchantModel.class.php index 0ecc5434b..7b8f65ecd 100644 --- a/Application/Admin/Model/PaymentMerchantModel.class.php +++ b/Application/Admin/Model/PaymentMerchantModel.class.php @@ -13,8 +13,8 @@ class PaymentMerchantModel extends Model "4"=>"快捷支付" ]; public $Channel=[ - "1"=>"支付宝", - "2"=>"微信", + "1"=>"官方支付宝", + "2"=>"官方微信", "3"=>"易宝支付", "4"=>"双乾支付", "5"=>"汇付宝支付" From 5acd5197ae146e1405dce57bcaa2c84c4aa0ed6d Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Aug 2020 18:40:30 +0800 Subject: [PATCH 28/82] =?UTF-8?q?=E5=B0=8Fbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 7 +++ .../Controller/PartnerController.class.php | 44 ++++++++++++++++--- .../Admin/View/CompanyGameRatio/addRatio.html | 36 ++++++++++++++- .../viewPuComplementStatement.html | 2 +- Application/Admin/View/Partner/lists.html | 9 ++++ 5 files changed, 89 insertions(+), 9 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 0904b917b..90e37395e 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -3079,3 +3079,10 @@ function getMerchantName($id = 1){ return $data['name']?$data['name']:'无'; } + + +function dateFormat($date) { + + return date("Y.m.d",strtotime($date)); + +} \ No newline at end of file diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index b30c63d31..c08502c33 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -53,6 +53,14 @@ class PartnerController extends ThinkController $map["_string"] = "(contract_start_time <= {$time_end} ) OR (contract_end_time <= {$time_end})"; } + if($_REQUEST['original_package_name']) { + $game_map['original_package_name'] = ['like',"%{$_REQUEST['original_package_name']}%"]; + } + + if($_REQUEST['relation_game_name']) { + $game_map['relation_game_name'] = ['like',"%{$_REQUEST['relation_game_name']}%"]; + } + $page = intval(I('get.p', 0)); $page = $page ? $page : 1; //默认显示第一页数据 $row = intval(I('row', 0)); @@ -75,10 +83,10 @@ class PartnerController extends ThinkController }else{ $partners = $query ->field("p.*") - ->page($page,$row) +// ->page($page,$row) ->select(); } - +// dump($partners);die(); //获取公司id $partner_ids = array_column($partners, 'id'); @@ -145,7 +153,6 @@ class PartnerController extends ThinkController } - $parseData = array(); foreach ($partners as $key =>$value) { $tmpr = D("CompanyRelation")->getCompanyRelation(1,$value['id']); @@ -187,6 +194,18 @@ class PartnerController extends ThinkController $value['row'] = empty($row2) ? 1: $row2; $parseData[] = $value; } + + if ($_REQUEST['original_package_name'] || $_REQUEST['relation_game_name']) { + + foreach ( $parseData as $key => $value ) { + + if (!$value['game']) { + unset($parseData[$key]); + } + + } + } + if($is_export){ $this->assign('listData', $parseData); $GetData = $_GET; @@ -195,10 +214,12 @@ class PartnerController extends ThinkController $this->display("export"); die(); } + + $count = count($parseData); /* 查询记录总数 */ - $count = $model - ->where($map) - ->count(); +// $count = $model +// ->where($map) +// ->count(); //分页 $parameter['p'] = $page; $parameter['row'] = $row; @@ -206,6 +227,17 @@ class PartnerController extends ThinkController if ($page) { $this->assign('_page', $page); } + + $arraypage = $page; + $size = $row;//每页显示的记录数 + $parseData = array_slice($parseData, ($arraypage - 1) * $size, $size); +// $page = set_pagination($count, $row, $parameter); +// if ($page) { +// $this->assign('_page', $page); +// } +// dump($arraypage); +// dump($size);die(); + $this->checkListOrCountAuthRestMap($map,[]); $this->assign('listData', $parseData); $this->assign('count', $count); diff --git a/Application/Admin/View/CompanyGameRatio/addRatio.html b/Application/Admin/View/CompanyGameRatio/addRatio.html index e06e7f857..ca657fe45 100644 --- a/Application/Admin/View/CompanyGameRatio/addRatio.html +++ b/Application/Admin/View/CompanyGameRatio/addRatio.html @@ -238,6 +238,30 @@ $(function(){ var elementIdName = $(this).attr('id'); promoteGameRatioData[elementIdName] = val; }); + + function getMonday() { + var nowTemp = new Date();//当前时间 + + var oneDayLong = 24*60*60*1000 ;//一天的毫秒数 + + var c_time = nowTemp.getTime() ;//当前时间的毫秒时间 + + var c_day = nowTemp.getDay()||7;//当前时间的星期几 + + var m_time = c_time - (c_day-1)*oneDayLong;//当前周一的毫秒时间 + + var monday = new Date(m_time);//设置周一时间对象 + var m_year = monday.getFullYear(); + + var m_month = monday.getMonth()+1; + if (m_month<10) { + m_month = '0'+ m_month; + } + + var m_date = monday.getDate(); + return m_year+'-'+m_month+'-'+m_date; + } + subevn(); function subevn(){ $('#submit').off("click"); @@ -251,7 +275,7 @@ $(function(){ "begin_time":["date","开始时间不能为空"], "end_time":["nocheck"], "remark":["nocheck",'',"textarea"] - } + }; var cres = CIC.checkAddInput(obj); if(!cres){ return false; @@ -277,7 +301,15 @@ $(function(){ layer.msg("流水及比例不允许为空", {icon: 2}); return false; } - }) + }); + var momday = getMonday(); + + //判断日期是否小于当周周一 + if (momday > cres.begin_time) { + layer.msg("配置的开始日期不能大于当周周一", {icon: 2}); + return false; + } + if(!flag){ return false; diff --git a/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html b/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html index 44181396d..2045e341c 100644 --- a/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html +++ b/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html @@ -147,7 +147,7 @@ {$it['account']} {$it['game_list'][0]['game_name']} {$it['game_list'][0]['game_type_name']} - {$it['game_list'][0]['statement_begin_time']}~{$it['game_list'][0]['statement_end_time']} + {$it['game_list'][0]['statement_begin_time']|dateFormat}~{$it['game_list'][0]['statement_end_time']|dateFormat} {$it['game_list'][0]['pay_amount']} {$it['game_list'][0]['increment_ratio']}% diff --git a/Application/Admin/View/Partner/lists.html b/Application/Admin/View/Partner/lists.html index 330f429d7..e84cea9d3 100644 --- a/Application/Admin/View/Partner/lists.html +++ b/Application/Admin/View/Partner/lists.html @@ -64,6 +64,15 @@ +
+ +
+ +
+ +
Date: Fri, 28 Aug 2020 19:49:35 +0800 Subject: [PATCH 29/82] =?UTF-8?q?=E6=AF=94=E4=BE=8B=E4=B8=8E=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementController.class.php | 8 +++++--- .../Admin/View/CompanyStatement/viewPcStatement.html | 7 ++++--- .../View/CompanyStatement/viewPuComplementStatement.html | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 3895bd401..05b3b4f10 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1446,8 +1446,10 @@ class CompanyStatementController extends ThinkController $statement_info[$k]['statement_type'] = 0; $statement_info[$k]['fax_ratio'] = $company_data['fax_ratio']; - } + $statement_info[$k]['statement_begin_time'] = dateFormat($v['statement_begin_time']); + $statement_info[$k]['statement_end_time'] = dateFormat($v['statement_end_time']); + } if ($company_data['company_type'] == 2) { @@ -1493,8 +1495,8 @@ class CompanyStatementController extends ThinkController $game_list['ratio'] = $v['ratio']; $game_list['fax_ratio'] = $company_data['fax_ratio']; - $game_list['sum_money'] = number_format(($aval['pay_amount']*($v['increment_ratio']))/100,2,'.',''); - $game_list['increment_ratio'] = number_format($v['increment_ratio'],2,'.',''); + $game_list['sum_money'] = ($aval['pay_amount']*($v['increment_ratio']))/100; + $game_list['increment_ratio'] = $v['increment_ratio']; $game_list['statement_begin_time'] = $v['statement_begin_time']; $game_list['statement_end_time'] = $v['statement_end_time']; $game_list['statement_type'] = '0'; diff --git a/Application/Admin/View/CompanyStatement/viewPcStatement.html b/Application/Admin/View/CompanyStatement/viewPcStatement.html index 5f98dd1db..32dfe40df 100644 --- a/Application/Admin/View/CompanyStatement/viewPcStatement.html +++ b/Application/Admin/View/CompanyStatement/viewPcStatement.html @@ -241,12 +241,13 @@ 合计 - - - + {$data['statement_count']['pay_amount']-0} + + + {$data['statement_count']['statement_money']-0} diff --git a/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html b/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html index 2045e341c..44181396d 100644 --- a/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html +++ b/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html @@ -147,7 +147,7 @@ {$it['account']} {$it['game_list'][0]['game_name']} {$it['game_list'][0]['game_type_name']} - {$it['game_list'][0]['statement_begin_time']|dateFormat}~{$it['game_list'][0]['statement_end_time']|dateFormat} + {$it['game_list'][0]['statement_begin_time']}~{$it['game_list'][0]['statement_end_time']} {$it['game_list'][0]['pay_amount']} {$it['game_list'][0]['increment_ratio']}% From 1c08d1a221715acee39943b12b7efb00c3664c9b Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Aug 2020 20:11:56 +0800 Subject: [PATCH 30/82] =?UTF-8?q?=E6=AF=94=E4=BE=8B=E6=A0=BC=E5=BC=8F?= =?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/Controller/PartnerController.class.php | 1 + .../Admin/Controller/PromoteCompanyController.class.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index c08502c33..725d3c733 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -128,6 +128,7 @@ class PartnerController extends ThinkController $val['name']="月流水>".$val['begin_total_amount']; } } + $val['ratio'] = floatval($val['ratio']); $parseGameRadiores[$val['game_id']][] = $val; } $myGameRadiores = $parseGameRadiores;//我方分成比例 diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index fb6f58fd9..ab032fd72 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -1321,7 +1321,7 @@ class PromoteCompanyController extends ThinkController $val['name']="月流水>".$val['begin_total_amount']; } } - $parseGameRadiores[$val['game_id']][] =['name'=>$val['name'],"ratio"=>$val['ratio']]; + $parseGameRadiores[$val['game_id']][] =['name'=>$val['name'],"ratio"=>floatval($val['ratio'])]; } return $parseGameRadiores; } @@ -1329,11 +1329,11 @@ class PromoteCompanyController extends ThinkController protected function setPromoteRadio(&$v){ $turnover_ratio = json_decode($v['turnover_ratio'],true); $v['turnover_ratio'] = array( - array("ratio"=>$v['ratio']."%","name"=>"默认比例") + array("ratio"=>floatval($v['ratio'])."%","name"=>"默认比例") ); foreach($turnover_ratio as $ke=>$va){ - $t=array("ratio"=>$va["ratio"]."%"); + $t=array("ratio"=>floatval($va["ratio"])."%"); if(array_key_exists("instanceof",$va)){ //存在 if($va['instanceof']=='1'){ From 9c11344906f4d6c4559ec38921899130b2aade7e Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 28 Aug 2020 20:34:16 +0800 Subject: [PATCH 31/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8B=E6=B8=B8?= =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=85=AC=E5=8F=B8=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PromoteCompanyController.class.php | 5 ++--- Application/Admin/View/PromoteCompany/export.html | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 9f94b9c09..093749cc9 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -188,7 +188,7 @@ class PromoteCompanyController extends ThinkController $promotemap['p.company_id']=["in",$companyallids]; $promotemap['p.level']=1; $promotecount = M("Promote","tab_")->alias('p')->where($promotemap)->count(); -// dd($companyres); + // dd($companyres); $this->assign('listData', $companyres); $this->assign('count', $count); $this->assign('promotecount', $promotecount); @@ -1300,7 +1300,7 @@ class PromoteCompanyController extends ThinkController if($is_export){ $CpRadio = $this->getPromoteCompanyCpRadio($game_ids); } - + // dd($CpRadio); $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(); @@ -1334,7 +1334,6 @@ class PromoteCompanyController extends ThinkController } } } - if(empty($game_arr)){ return $senddata; } diff --git a/Application/Admin/View/PromoteCompany/export.html b/Application/Admin/View/PromoteCompany/export.html index ec4baf16e..6009de6b8 100644 --- a/Application/Admin/View/PromoteCompany/export.html +++ b/Application/Admin/View/PromoteCompany/export.html @@ -209,8 +209,8 @@ {$p_ratio['turnover_ratio'][0]['name']|default="--"} {$p_ratio['turnover_ratio'][0]['ratio']|showPercent} - {$p_ratio['cp_ratio'][$gamekey]['name']|default="--"} - {$p_ratio['cp_ratio'][$gamekey]['ratio']|showPercent} + {$p_ratio['cp_ratio'][0]['name']|default="--"} + {$p_ratio['cp_ratio'][0]['ratio']|showPercent} - - From 1dd594f46f7e9677e5f1d581fb4499151842d4bd Mon Sep 17 00:00:00 2001 From: "elf@home" <360197197@qq.com> Date: Mon, 31 Aug 2020 08:13:07 +0800 Subject: [PATCH 32/82] =?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/Base/Service/PromoteCompanyService.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Application/Base/Service/PromoteCompanyService.class.php b/Application/Base/Service/PromoteCompanyService.class.php index 6ab981e6d..6ba0b735a 100644 --- a/Application/Base/Service/PromoteCompanyService.class.php +++ b/Application/Base/Service/PromoteCompanyService.class.php @@ -178,14 +178,14 @@ class PromoteCompanyService $application['company_id'] = $companyInfo['id'] = M('promote_company', 'tab_')->add($companyInfo); }else{ //编辑 - $oldInfo = M('promote_company', 'tab_')->field(['id', 'company_belong'])->where(['id' => $application['company_id']])->find(); + $oldInfo = M('promote_company', 'tab_')->field(['id', 'company_belong', 'develop_type', 'game_ids'])->where(['id' => $application['company_id']])->find(); /** 内团/无 切换为外团 */ if (in_array($companyInfo['company_belong'], [1, 2]) && !in_array($oldInfo['company_belong'], [1, 2])) { $isNewDeposit = true; } M('promote_company', 'tab_')->save($companyInfo); - $this->changePromote($companyInfo); + $this->changePromote($companyInfo, $oldInfo); } $this->savePromoteCompanyRelation($bindRelation, $companyInfo); @@ -236,7 +236,8 @@ class PromoteCompanyService } } - protected function changePromote($companyInfo){ + protected function changePromote($companyInfo, $oldInfo) + { $isChangeBelong = false; $isChangeRelation =false; @@ -245,7 +246,7 @@ class PromoteCompanyService } $companyId = $companyInfo['id']; - $oldInfo = M('promote_company', 'tab_')->field('company_belong,develop_type,game_ids')->where(['id' => $companyId])->find(); + // $oldInfo = M('promote_company', 'tab_')->field('company_belong,develop_type,game_ids')->where(['id' => $companyId])->find(); if(isset($companyInfo['company_belong']) && ($oldInfo['company_belong'] != $companyInfo['company_belong'])){ $isChangeBelong = true; From ba806685602bced5aab903ca36cd966514a6918b Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 31 Aug 2020 09:52:39 +0800 Subject: [PATCH 33/82] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementController.class.php | 2 +- Application/Admin/View/CompanyStatement/lists.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 05b3b4f10..e1a57619b 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1610,7 +1610,7 @@ class CompanyStatementController extends ThinkController "export"=>"批量导出", "updateNewStatement"=>"新增结算", "launch"=>"对外发起", - "specialComplement"=>"特殊补点", + "viewSpecialComplement"=>"特殊补点", "delStatement"=>"批量删除" ]; $resarr = []; diff --git a/Application/Admin/View/CompanyStatement/lists.html b/Application/Admin/View/CompanyStatement/lists.html index 13d7f6a50..bfb312e15 100644 --- a/Application/Admin/View/CompanyStatement/lists.html +++ b/Application/Admin/View/CompanyStatement/lists.html @@ -433,7 +433,7 @@ }); }); - $("#specialComplement").click(function () { + $("#viewSpecialComplement").click(function () { var id = $(this).data("id"); var url = "{:U('viewSpecialComplement')}"+"&id="+id layer.open({ From 1b949af7f519b190bacfa9ee72b80d0e3c372e80 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 31 Aug 2020 10:25:19 +0800 Subject: [PATCH 34/82] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/PromoteCompanyController.class.php | 2 +- Application/Admin/View/Partner/show.html | 2 +- Application/Admin/View/PromoteCompany/add.html | 2 +- Application/Admin/View/PromoteCompany/edit.html | 2 +- Application/Admin/View/PromoteCompany/view.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 07517d3b3..526b82ca7 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -623,7 +623,7 @@ class PromoteCompanyController extends ThinkController $promoteCompanyService = new PromoteCompanyService(); - $oldData = M('promote_company', 'tab_')->field(['id', 'company_belong'])->where(['id' => $save['company_id']])->find(); + $oldData = M('promote_company', 'tab_')->field(['id', 'company_belong'])->where(['id' => $save['id']])->find(); $isNewDeposit = false; if (!in_array($oldData['company_belong'], [1, 2]) && in_array($save['company_belong'], [1, 2])) { $isNewDeposit = true; diff --git a/Application/Admin/View/Partner/show.html b/Application/Admin/View/Partner/show.html index 8f6a02ca2..32ceaa210 100644 --- a/Application/Admin/View/Partner/show.html +++ b/Application/Admin/View/Partner/show.html @@ -359,7 +359,7 @@
diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index f6414308e..37a498041 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -609,7 +609,7 @@ diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index f235cbf96..842c120a9 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -625,7 +625,7 @@ diff --git a/Application/Admin/View/PromoteCompany/view.html b/Application/Admin/View/PromoteCompany/view.html index ed72c2bb0..267c7628a 100644 --- a/Application/Admin/View/PromoteCompany/view.html +++ b/Application/Admin/View/PromoteCompany/view.html @@ -637,7 +637,7 @@ From e94994993a7dec981eb57a7deb4383e1faa5ed0d Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 31 Aug 2020 10:44:12 +0800 Subject: [PATCH 35/82] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E9=87=8D=E7=AE=97=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/CompanyStatementController.class.php | 12 +++++++++++- Application/Admin/View/CompanyStatement/lists.html | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index e1a57619b..a7984ef22 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -447,7 +447,17 @@ class CompanyStatementController extends ThinkController { if(!isset($_REQUEST['ids'])) $this->error("参数错误"); $ids = $_REQUEST['ids']; - $dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select(); + $dbres = $this->DBModel->field("id,verify_status,verify_log,withdraw_type")->where("id in ({$ids})")->select(); + foreach ($dbres as $key => $value) { + if($value['withdraw_type'] == 3) { + $this->ajaxReturn(array( + 'status' => 0, + "info"=>"特殊补点无法重算" + )); + } + } + + foreach($dbres as $k=>&$v){ // if(in_array($v['verify_status'],[3,4])) continue; //合作方确认后不进行重算 //重算 diff --git a/Application/Admin/View/CompanyStatement/lists.html b/Application/Admin/View/CompanyStatement/lists.html index bfb312e15..efbb76f37 100644 --- a/Application/Admin/View/CompanyStatement/lists.html +++ b/Application/Admin/View/CompanyStatement/lists.html @@ -478,7 +478,7 @@ var opst ="[审批通过]"; var status = [1]; }else if(id=="updateStatement"){ - var opname = "重算金额"; + var opname = "重算金额(特殊补点无法重算)"; var opurl = "{:U('updateStatement')}"; var opst ="[汇总撤销,管理员审批拒绝,未进行审批,管理员审批通过]"; var status = [-3,-2,-1,0,1]; From 8f4b86ee2e0293a0f293be1ecd4e7a19eac25103 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 31 Aug 2020 13:37:19 +0800 Subject: [PATCH 36/82] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/PromoteCompany/add.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index 37a498041..9953f0a5b 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -238,7 +238,7 @@ - + *押金付款方式: @@ -262,21 +262,21 @@ - + *押金金额: - + 押金付款人: - + 押金付款账号: From 7a04411e4d37083e3dd98bfcdaed4533a74e0161 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 31 Aug 2020 14:33:53 +0800 Subject: [PATCH 37/82] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E4=B8=8E=E5=85=B6=E4=BB=96=E6=B1=87=E6=80=BB=E9=87=8D=E7=AE=97?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8C=BA=E5=88=86=E6=B7=BB=E5=8A=A0=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 9 ------- .../CompanyStatementLackController.class.php | 26 ++++++++++++++++--- .../Admin/View/CompanyStatement/lists.html | 9 ++++--- .../View/CompanyStatementLack/lists.html | 2 ++ 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index a7984ef22..99958bf56 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -448,15 +448,6 @@ class CompanyStatementController extends ThinkController if(!isset($_REQUEST['ids'])) $this->error("参数错误"); $ids = $_REQUEST['ids']; $dbres = $this->DBModel->field("id,verify_status,verify_log,withdraw_type")->where("id in ({$ids})")->select(); - foreach ($dbres as $key => $value) { - if($value['withdraw_type'] == 3) { - $this->ajaxReturn(array( - 'status' => 0, - "info"=>"特殊补点无法重算" - )); - } - } - foreach($dbres as $k=>&$v){ // if(in_array($v['verify_status'],[3,4])) continue; //合作方确认后不进行重算 diff --git a/Application/Admin/Controller/CompanyStatementLackController.class.php b/Application/Admin/Controller/CompanyStatementLackController.class.php index d28c960f0..4fef420fd 100644 --- a/Application/Admin/Controller/CompanyStatementLackController.class.php +++ b/Application/Admin/Controller/CompanyStatementLackController.class.php @@ -82,6 +82,7 @@ class CompanyStatementLackController extends ThinkController $v['company_type_str'] = $this->CompanyType[$v['company_type']]; $v["valid"] = "{$v['statement_begin_time']}-{$v['statement_end_time']}"; $v['oplist'] = $this->OpAuth($v); + $v['withdraw_type_str'] = ($v['withdraw_type']==3?"特殊补点":"正常结算");; } $count = $this->DBModel->field("count(id) count,sum(statement_money) statement_money")->where($map)->find(); @@ -136,6 +137,21 @@ class CompanyStatementLackController extends ThinkController if(!isset($_REQUEST['ids'])) $this->error("参数错误"); $ids = $_REQUEST['ids']; $dbres = $this->DBModel->field("*")->where("id in ({$ids})")->select(); + + $hav_special = 0; + $hav_common = 0; + foreach ($dbres as $key => $value) { + if ($value['withdraw_type'] == 3) { + $hav_special = 1; + } else { + $hav_common = 1; + } + } + + if ($hav_special && $hav_common) { + $this->error("特殊补点不能与正常结算一起汇总"); + } + //分单 $basedata = [ "pay_amount"=>0, @@ -152,7 +168,7 @@ class CompanyStatementLackController extends ThinkController "verify_status"=>0, "verify_log"=>json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y.m.d H:i:s")]), "op_time"=>time(), - "company_list"=>[] + "company_list"=>[], ]; $datas = ["ups","up","downs","down","user","users"]; //初始化数据 @@ -269,6 +285,7 @@ class CompanyStatementLackController extends ThinkController } protected function addStatementInfo($va,$ke,&$v,$k){ + if($k=="ups" || $k=='downs' || $k =="users"){ $verify_status = 0; }else{ @@ -294,8 +311,10 @@ class CompanyStatementLackController extends ThinkController "statement_end_time"=>$v['statement_end_time'], "statement_info"=>json_encode($va['statement_info'],JSON_UNESCAPED_UNICODE), "statement_num"=>$va['statement_num'], - "verify_status"=>$verify_status + "verify_status"=>$verify_status, + "withdraw_type"=>$va['withdraw_type'] ]; + $companyid = $StatementInfo->add($company); $v['info_ids'][] =$companyid; $v['statement_money'] +=$va['statement_money']; @@ -337,7 +356,8 @@ class CompanyStatementLackController extends ThinkController "fine"=>$fine, "reward"=>$reward, "statement_info"=>$v['statement_info'], - "statement_num"=>"JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5) + "statement_num"=>"JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5), + "withdraw_type"=>$v['withdraw_type'], ]; $savedata['company_list'][$v['company_id']] = $tdata; } diff --git a/Application/Admin/View/CompanyStatement/lists.html b/Application/Admin/View/CompanyStatement/lists.html index efbb76f37..8147dc3f2 100644 --- a/Application/Admin/View/CompanyStatement/lists.html +++ b/Application/Admin/View/CompanyStatement/lists.html @@ -222,7 +222,7 @@ - + {$data.company_name} {$data.company_belong} {$data.valid} @@ -478,9 +478,9 @@ var opst ="[审批通过]"; var status = [1]; }else if(id=="updateStatement"){ - var opname = "重算金额(特殊补点无法重算)"; + var opname = "重算金额"; var opurl = "{:U('updateStatement')}"; - var opst ="[汇总撤销,管理员审批拒绝,未进行审批,管理员审批通过]"; + var opst ="[汇总撤销,管理员审批拒绝,未进行审批,管理员审批通过,非特殊补点]"; var status = [-3,-2,-1,0,1]; var confirm = true; }else if(id=="delStatement"){ @@ -493,7 +493,8 @@ var confirm = confirm ? confirm :false; var flag = false; var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { - if($.inArray( $(elem).data("status"),status) == -1){ + + if($.inArray( $(elem).data("status"),status) == -1||(id=="updateStatement" && $(elem).data("type")==3)){ flag = true; }else{ return $(elem).val(); diff --git a/Application/Admin/View/CompanyStatementLack/lists.html b/Application/Admin/View/CompanyStatementLack/lists.html index 83f332070..21152b647 100644 --- a/Application/Admin/View/CompanyStatementLack/lists.html +++ b/Application/Admin/View/CompanyStatementLack/lists.html @@ -158,6 +158,7 @@ 合作公司 公司类型 + 结算类型 结算时间 打款流程 结算金额 @@ -180,6 +181,7 @@ {$data.company_name} {$data.company_type_str} + {$data.withdraw_type_str} {$data.valid} {$data.is_payment_str} From 2c9092273f168b9ef93057a732f6f1a2a2112d19 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 31 Aug 2020 15:36:52 +0800 Subject: [PATCH 38/82] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/PromoteCompanyService.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Application/Base/Service/PromoteCompanyService.class.php b/Application/Base/Service/PromoteCompanyService.class.php index 6ba0b735a..a2acdd9a5 100644 --- a/Application/Base/Service/PromoteCompanyService.class.php +++ b/Application/Base/Service/PromoteCompanyService.class.php @@ -281,12 +281,17 @@ class PromoteCompanyService private function savePromotes($records, $company, $creator) { + $status = 0; + if (C('PROMOTE_AUTO_AUDIT') == 1) { + $status = 1; + } $promoteService = new PromoteService(); foreach ($records as $record) { $promoteService->addPromote([ 'account' => $record['account'], 'password' => $record['password'], 'real_name' => $record['real_name'], + 'status' => $status, 'email' => $record['email'], 'mobile_phone' => $record['mobile_phone'], 'can_view_recharge' => $record['can_view_recharge'], From 050eb98843cfc5ba0d7245e890612a3be6b9b6ab Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 31 Aug 2020 15:52:40 +0800 Subject: [PATCH 39/82] xiugai --- Application/Base/Service/PromoteCompanyService.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Base/Service/PromoteCompanyService.class.php b/Application/Base/Service/PromoteCompanyService.class.php index a2acdd9a5..66c1c09df 100644 --- a/Application/Base/Service/PromoteCompanyService.class.php +++ b/Application/Base/Service/PromoteCompanyService.class.php @@ -281,10 +281,10 @@ class PromoteCompanyService private function savePromotes($records, $company, $creator) { - $status = 0; - if (C('PROMOTE_AUTO_AUDIT') == 1) { + $status = 1; + /* if (C('PROMOTE_AUTO_AUDIT') == 1) { $status = 1; - } + } */ $promoteService = new PromoteService(); foreach ($records as $record) { $promoteService->addPromote([ From 75c7b635b652bbbf3fbf3a663a1f2cb2dd3e7d18 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 31 Aug 2020 16:46:01 +0800 Subject: [PATCH 40/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8A=E6=B8=B8?= =?UTF-8?q?=E7=BB=93=E7=AE=97=E6=A3=80=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementController.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 99958bf56..d9a98773a 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -54,13 +54,13 @@ class CompanyStatementController extends ThinkController if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { $time_start = strtotime($_REQUEST['time_start']); $time_end = strtotime($_REQUEST['time_end'])+ 86399; - $map["_string"] = "(statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (statement_end_time BETWEEN {$time_start} AND {$time_end})"; + $map["_string"] = "( (statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (statement_end_time BETWEEN {$time_start} AND {$time_end}) )"; } elseif (isset($_REQUEST['time_start'])) { $time_start = strtotime($_REQUEST['time_start']); - $map["_string"] = "(statement_begin_time >= {$time_start} ) OR (statement_end_time >= {$time_start})"; + $map["_string"] = "( (statement_begin_time >= {$time_start} ) OR (statement_end_time >= {$time_start}) )"; } elseif (isset($_REQUEST['time_end'])) { $time_end = strtotime($_REQUEST['time_end'])+ 86399; - $map["_string"] = "(statement_begin_time <= {$time_end} ) OR (statement_end_time <= {$time_end})"; + $map["_string"] = "( (statement_begin_time <= {$time_end} ) OR (statement_end_time <= {$time_end}) )"; } if (isset($_REQUEST['time_start2']) && isset($_REQUEST['time_end2'])) { @@ -144,7 +144,7 @@ class CompanyStatementController extends ThinkController if(isset($_REQUEST['confirm_status'])){ $map['confirm_status'] = $_REQUEST['confirm_status']; } - + // dd($map); // $this->checkListOrCountAuthRestMap($map);//导出权限 //条件end $data = M("company_statement","tab_") From 2ff538886cb089bc9fb78ee171a31568bec93a24 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 31 Aug 2020 17:42:11 +0800 Subject: [PATCH 41/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8A=E6=B8=B8?= =?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 | 103 +++++++++--------- 1 file changed, 54 insertions(+), 49 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index cbaf8468c..cbf58355a 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -299,55 +299,60 @@ class CompanyStatementSetController extends Controller { $promote_ratio = $cp[$add_data['company_id']]['channel_rate'] ?? 0; $fax_ratio = $cp[$add_data['company_id']]['taxation_rate'] ?? 0; //游戏统计 - if(!isset($v['list'])){continue;} - foreach($v['list'] as $ke=>$va){ - $game =[]; - $game['pay_amount'] =$va['pay_money']; - $game['game_name'] =$ke; - //获取游戏id及比例 - $game_id = $GameDb->where("relation_game_name='{$ke}' OR original_package_name='{$ke}'")->field("id,relation_game_id")->find(); - if(empty($game_id) && isset($va['unique_code']) && !empty($va['unique_code'])){ - $unique_code = $va['unique_code']; - $game_id = $GameDb->where("unique_code='{$unique_code }'")->field("id,relation_game_id")->find(); - } - if(empty($game_id)){ - $game['relation_game_id']=0; - $tratio = 0; - }else{ - //获取比例 - $game['relation_game_id']=$game_id['relation_game_id']; - if($type == 1){ - $tratio = getGameCpRadio($game_id['id'],$va['pay_money'],true); - }elseif($type == 0){ - $tratio = getGameCpRadio($game_id['id'],$va['pay_money'],false); - }else{ - //补丁 - $tratio1 = getGameCpRadio($game_id['id'],$va['pay_money'],true); - $tratio2 = getGameCpRadio($game_id['id'],$va['pay_money'],false); - $tratio = $tratio1-$tratio2; - if($tratio <= 0){continue;} - } - } - if($v['first_company_type'] == 1){ - $game['first_ratio']=$tratio-0; - $game['second_ratio']=100-$tratio; - }else{ - $game['first_ratio']=100-$tratio; - $game['second_ratio']=$tratio-0; - } - $add_data['pay_amount'] += $va['pay_money']; - - $game['sum_money']=round($va['pay_money']*(100-$promote_ratio)*$tratio*(100-$fax_ratio)/(100*100*100),2);//结算金额=平台总额*(1-渠道费)*分成比例*(1-税费费率) - - $add_data['statement_money'] += $game['sum_money']; + if (isset($v['list'])) { + foreach ($v['list'] as $ke=>$va) { + $game =[]; + $game['pay_amount'] =$va['pay_money']; + $game['game_name'] =$ke; + //获取游戏id及比例 + $game_id = $GameDb->where("relation_game_name='{$ke}' OR original_package_name='{$ke}'")->field("id,relation_game_id")->find(); + if (empty($game_id) && isset($va['unique_code']) && !empty($va['unique_code'])) { + $unique_code = $va['unique_code']; + $game_id = $GameDb->where("unique_code='{$unique_code }'")->field("id,relation_game_id")->find(); + } + if (empty($game_id)) { + $game['relation_game_id']=0; + $tratio = 0; + } else { + //获取比例 + $game['relation_game_id']=$game_id['relation_game_id']; + if ($type == 1) { + $tratio = getGameCpRadio($game_id['id'], $va['pay_money'], true); + } elseif ($type == 0) { + $tratio = getGameCpRadio($game_id['id'], $va['pay_money'], false); + } else { + //补丁 + $tratio1 = getGameCpRadio($game_id['id'], $va['pay_money'], true); + $tratio2 = getGameCpRadio($game_id['id'], $va['pay_money'], false); + $tratio = $tratio1-$tratio2; + if ($tratio <= 0) { + continue; + } + } + } + if ($v['first_company_type'] == 1) { + $game['first_ratio']=$tratio-0; + $game['second_ratio']=100-$tratio; + } else { + $game['first_ratio']=100-$tratio; + $game['second_ratio']=$tratio-0; + } + $add_data['pay_amount'] += $va['pay_money']; + + $game['sum_money']=round($va['pay_money']*(100-$promote_ratio)*$tratio*(100-$fax_ratio)/(100*100*100), 2);//结算金额=平台总额*(1-渠道费)*分成比例*(1-税费费率) + + $add_data['statement_money'] += $game['sum_money']; - $game['fax_ratio']=$fax_ratio; - $game['promote_ratio']=$promote_ratio; + $game['fax_ratio']=$fax_ratio; + $game['promote_ratio']=$promote_ratio; - $game['statement_begin_time']=$statement_begin_time; - $game['statement_end_time']=$statement_end_time; - $game['statement_type']=0; - $add_data['statement_info'][] = $game; + $game['statement_begin_time']=$statement_begin_time; + $game['statement_end_time']=$statement_end_time; + $game['statement_type']=0; + $add_data['statement_info'][] = $game; + } + }else{ + $add_data['statement_info'] = []; } $add_data['platform_amount'] = $add_data['pay_amount']; if($type < 2){ @@ -411,9 +416,9 @@ class CompanyStatementSetController extends Controller { //金额为0不补点 continue; } - if($add_data['platform_amount'] == 0){ + if($add_data['platform_amount'] == 0 && $add_data['statement_money'] == 0){ //全等于0表示没有流水,小于0依旧要结算 - return; + continue; } //添加 if($recount && $company_id !== false){ From 288078c959bbea5e8c0deda677d1e9e6f4ba9e73 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 31 Aug 2020 18:21:34 +0800 Subject: [PATCH 42/82] =?UTF-8?q?=E4=B8=8A=E6=B8=B8=E5=AF=BC=E5=87=BA?= =?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 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 90e37395e..92836eedc 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -1892,7 +1892,7 @@ function excelUpStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_ $objPHPExcel->getActiveSheet()->setCellValue('J3', $data['second_party_info']['link_man']); $objPHPExcel->getActiveSheet()->setCellValue('J4', $data['second_party_info']['link_phone']."\t"); $objPHPExcel->getActiveSheet()->setCellValue('J5', $data['second_party_info']['address']); - $objPHPExcel->getActiveSheet()->setCellValue('J6', $data['second_party_info']['company_tax_no']); + $objPHPExcel->getActiveSheet()->setCellValue('J6', $data['second_party_info']['company_tax_no']." "); $objPHPExcel->getActiveSheet()->setCellValue('C7', "支付给:".$data['receive_company']['partner']); //增加支付给对应公司 $line = 10; From f37f6c51dde272f53b8f1cb3bb6541c45cf5aa6e Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 31 Aug 2020 18:56:54 +0800 Subject: [PATCH 43/82] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/UserController.class.php | 9 +++++++++ .../Home/Controller/BaseController.class.php | 13 +++++++++++++ 2 files changed, 22 insertions(+) diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index 48c7c8bfd..dc32cb6f0 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -387,6 +387,15 @@ class UserController extends AdminController $this->error('该手机号码已经添加过!'); } } + + $group = M('auth_group', 'sys_')->where(['id' => I('auth')])->find(); + if (is_null($group)) { + $this->error('角色类型不存在!'); + } else { + if (!IS_ROOT && strpos($group['title'], '市场专员') !== false && !isMarketLeader()) { + $this->error('市场专员编辑仅允许市场总监操作!'); + } + } // if (isset($_POST['mobile']) && $_POST['mobile'] != '') { // $dx = A('Phone'); // $res = $dx->check_tel_code($_POST['mobile'], $_POST['code']); diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index d9cec83e2..fa876e441 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -391,6 +391,19 @@ class BaseController extends HomeController if ($permission == 'view-user-recharge') { $promoteService = new PromoteService(); $topPromote = $promoteService->getTopPromote($promote); + + /** + * 市场部特殊推广公司的规则 + */ + $onlyPresidentList = [330, 331, 332]; + if (in_array($topPromote['company_id'], $onlyPresidentList)) { + if ($topPromote['can_view_recharge'] == 1 && $promote['level'] == 1) { + return true; + } else { + return false; + } + } + if ($topPromote['can_view_recharge'] == 1) { return true; } From 4bb7015e1be322502b9ea084b3f9c76b449a8945 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 31 Aug 2020 19:31:36 +0800 Subject: [PATCH 44/82] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/UserController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index dc32cb6f0..f20320617 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -392,8 +392,8 @@ class UserController extends AdminController if (is_null($group)) { $this->error('角色类型不存在!'); } else { - if (!IS_ROOT && strpos($group['title'], '市场专员') !== false && !isMarketLeader()) { - $this->error('市场专员编辑仅允许市场总监操作!'); + if (isMarketLeader() && strpos($group['title'], '市场专员') === false) { + $this->error('市场总监只允许操作允许编辑市场专员账号!'); } } // if (isset($_POST['mobile']) && $_POST['mobile'] != '') { From f92f59601d25ca8b30e9176c52510e4b8f8b8edb Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 1 Sep 2020 11:17:04 +0800 Subject: [PATCH 45/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8A=E6=B8=B8?= =?UTF-8?q?=E7=BB=93=E7=AE=97=E6=A8=A1=E6=9D=BF=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Public/Admin/excel/up_stream.xls | Bin 20992 -> 21504 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Public/Admin/excel/up_stream.xls b/Public/Admin/excel/up_stream.xls index cfcba995d4d73fbe85fcab9a226083578abe76a7..8f56a516d3999e3167ddbc51da49dddefc10b6ca 100644 GIT binary patch delta 942 zcma)5O=uHQ5S|y`CfQAs>^7U9+WcA5D5AuQh>;jtNUby>2J6X|T4@fo1`Og))oLP^ zdQc>0f(7v?;>Ai`k3vO6FM^jK9<6xtB%&TX7$+OIC{4j#X1|$lX5P$u^R|4Sl^?Q7 zg7qxzf6Z7F1=A%gr>yQ@jYcB^0KFtzNSgLm?P_Y0Re3@Da{9$CNBJGwjA!{ZlQoGy z`Dcegwh+GxA33D24B~rpCLu$kRAICZ%%3!|8>1tK`amV?e|T-e@_=y>Dh#K^?HHAO z_(SxenZ!Z*D^bO1$&X1%#k(Zqq80CuZ;$A~Jjt-=#~|5@B=h7yEUDU}^hjVK9FvbR zA3l>~U2f{-dqW0z+U$`YZVP{)4g<)Q7;SU6(k>>T$9Qp8iIx16q_6Nz&!^9G-P^Mc z?=ko~&TsmQU$8CM z3_gr=ow3oiyZM%7Q^y8?*ae(CN_PPvy^`N)mxZ=fLSCF|e12 zcESW9O$iPXItY&t(hy*bkS-MD2|Ec3gf7Aw4yH?XGij5s11`c8oWPZINQO^0^?$0L aJTP@;Z#6T+-e?yx*BQ#$qE^gSHv9%uZP>;D delta 739 zcmZvaOK1~e5XWcMP4|%+v)MJTCQVvn1VLk=R3mL@5Q~(g1jPqbe1KFBL5sAY7&KC` zH<3(fp*Jy#2Ore$D#Vi>y%Z_pK?E-zJct$XV4VH7p&s02_CMcmX1|$lcI!{D-o*RE z*tatB7I7!}lpC=>?RML>9RQGF%d)xaUE=oGMQo^5W8b&Q#&Y#N_S397r~DeB-|E*u z2YO21eVO(;N`oclKCF@GpB$ZiS>H5 zHlt~Fw{1lCXJjx`8zy9cS7nX9x z&jS?PUg?Y#(RRzXvgFuu7dmcFxzobD+cAByhujtIae5^kkaX5tiAPSCrd}N{J`^u{ z?j^Ax3i&*W`GehB072n`$hQv^Q#>eMQC^Nk6}36nS{I2U3o1UPmC~`|AOduA<|yk{ z))Fhv3r?{HSTC^hgrLgG9|mSvL##Dco3%-Y%eSaj&d^#p+L*Y8AI0^Fc?{Oyos|FN SDCfYXnFEc=w5V6=TmAxwzr0`o From e10b27a067f9f93372b253345f68a07ff8b5546a Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 1 Sep 2020 12:15:19 +0800 Subject: [PATCH 46/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8B=E6=B8=B8?= =?UTF-8?q?=E5=86=85=E5=9B=A2=E6=B1=9F=E6=81=AF=E7=BD=91=E7=BB=9C=E5=BD=92?= =?UTF-8?q?=E5=B1=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementSetController.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index cbf58355a..0d7512876 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -499,10 +499,13 @@ class CompanyStatementSetController extends Controller { ]; //获取pc公司 $company = M("CompanyInfo","tab_")->field("id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank")->where("partner = '海南万盟天下科技有限公司'")->find(); + $first_party_info = json_encode($company,JSON_UNESCAPED_UNICODE); + $company['partner'] = C("OFFICIEL_CHANNEL"); + $second_party_info = json_encode($company,JSON_UNESCAPED_UNICODE); $add_data=[ - "first_party_info"=>json_encode($company,JSON_UNESCAPED_UNICODE), - "second_party_info"=>json_encode($company,JSON_UNESCAPED_UNICODE), - "pay_type"=>1, + "first_party_info"=>$first_party_info, + "second_party_info"=>$second_party_info, + "pay_type"=>2, "withdraw_type"=>1, "statement_begin_time"=>$begintime, "statement_end_time"=>$endtime, @@ -514,7 +517,7 @@ class CompanyStatementSetController extends Controller { "is_payment"=>2, "statement_info"=>[], "company_belong"=>0, - "company_name"=>'海南万盟天下科技有限公司', + "company_name"=>C("OFFICIEL_CHANNEL"), "company_id"=>0, "company_type"=>1 ]; From 3adf8a93f89f63fb8dc75b2c4da21ed33a5dcf9d Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 1 Sep 2020 15:53:38 +0800 Subject: [PATCH 47/82] =?UTF-8?q?=E6=AF=94=E4=BE=8B=E6=A0=BC=E5=BC=8F?= =?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/CompanyGameRatioController.class.php | 4 ++-- .../Admin/Controller/GameRatioMouldController.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/CompanyGameRatioController.class.php b/Application/Admin/Controller/CompanyGameRatioController.class.php index 77d6d837d..79c2fe3ec 100644 --- a/Application/Admin/Controller/CompanyGameRatioController.class.php +++ b/Application/Admin/Controller/CompanyGameRatioController.class.php @@ -966,11 +966,11 @@ class CompanyGameRatioController extends AdminController $turnoverratio = json_decode($turnover_ratio[$key],true); $v['turnover_ratios'][$key] = array( - array("ratio"=>$value."%","name"=>"默认比例") + array("ratio"=>floatval($value)."%","name"=>"默认比例") ); foreach($turnoverratio as $ke=>$va){ - $t=array("ratio"=>$va["ratio"]."%"); + $t=array("ratio"=>floatval($va["ratio"])."%"); if(array_key_exists("instanceof",$va)){ //存在 if($va['instanceof']=='1'){ diff --git a/Application/Admin/Controller/GameRatioMouldController.class.php b/Application/Admin/Controller/GameRatioMouldController.class.php index eac5363f7..17ff6fea9 100644 --- a/Application/Admin/Controller/GameRatioMouldController.class.php +++ b/Application/Admin/Controller/GameRatioMouldController.class.php @@ -214,11 +214,11 @@ class GameRatioMouldController extends AdminController protected function readTurnoverRatio(&$v){ $turnover_ratio = json_decode($v['turnover_ratio'],true); $v['turnover_ratio'] = array( - array("ratio"=>$v['ratio']."%","name"=>"默认比例") + array("ratio"=>floatval($v['ratio'])."%","name"=>"默认比例") ); foreach($turnover_ratio as $ke=>$va){ - $t=array("ratio"=>$va["ratio"]."%"); + $t=array("ratio"=>floatval($va["ratio"])."%"); if(array_key_exists("instanceof",$va)){ //存在 if($va['instanceof']=='1'){ From d7b9a0ac1a1a0cebb252e04adb2787d86cef869d Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 1 Sep 2020 16:28:18 +0800 Subject: [PATCH 48/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E6=92=A4=E9=94=80=E6=B1=87=E6=80=BB=E8=BF=9B=E8=A1=8C=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E6=B1=87=E6=80=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 27 ++++++++++--------- .../Admin/View/CompanyStatement/lists.html | 6 ++--- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index d9a98773a..042994766 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -710,16 +710,17 @@ class CompanyStatementController extends ThinkController } foreach ($dbres as $k=>$v) { - if($v['verify_status'] != 1) continue; - if($v['company_belong'] == 9){ - //上游 - $this->setDf($datas['up'],$v); - } elseif($v['withdraw_type'] == 3&&$v['company_type']==1){ - $this->setDf($datas['complement_down'],$v); - } elseif($v['withdraw_type'] == 3&&$v['company_type']==2){ - $this->setDf($datas['complement_user'],$v); - } else { - $this->setDf($datas['down'],$v); + if($v['verify_status'] == 1 || $v['verify_status'] == -2){ + if($v['company_belong'] == 9){ + //上游 + $this->setDf($datas['up'],$v); + } elseif($v['withdraw_type'] == 3&&$v['company_type']==1){ + $this->setDf($datas['complement_down'],$v); + } elseif($v['withdraw_type'] == 3&&$v['company_type']==2){ + $this->setDf($datas['complement_user'],$v); + } else { + $this->setDf($datas['down'],$v); + } } } @@ -770,7 +771,7 @@ class CompanyStatementController extends ThinkController M("company_lack_statement_info","tab_")->where("id in ({$v['del_lack_ids']})")->save(["is_pool"=>1]); } //修改结算单规则 - $this->updatePoolVerifyStatus($v['statement_ids'],1,2,"pool",$v['statement_num']); + $this->updatePoolVerifyStatus($v['statement_ids'],2,"pool",$v['statement_num']); } $this->ajaxReturn(array( 'status' => 1, @@ -778,10 +779,10 @@ class CompanyStatementController extends ThinkController )); } //结算单规则 - protected function updatePoolVerifyStatus($ids,$old_status,$change_status,$op_pre,$num){ + protected function updatePoolVerifyStatus($ids,$change_status,$op_pre,$num){ $dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select(); foreach($dbres as $k=>&$v){ - if($v['verify_status'] != $old_status) continue; + // if($v['verify_status'] != $old_status) continue; $v['verify_log'] = json_decode($v['verify_log'],true); $v['verify_log'][$op_pre.'_user']=$this->admininfo["username"]; $v['verify_log'][$op_pre.'_time']=date("Y.m.d H:i:s"); diff --git a/Application/Admin/View/CompanyStatement/lists.html b/Application/Admin/View/CompanyStatement/lists.html index 8147dc3f2..bc77a6907 100644 --- a/Application/Admin/View/CompanyStatement/lists.html +++ b/Application/Admin/View/CompanyStatement/lists.html @@ -475,8 +475,8 @@ }else if(id=="pool"){ var opname = "发起汇总"; var opurl = "{:U('pool')}"; - var opst ="[审批通过]"; - var status = [1]; + var opst ="[审批通过,汇总撤销]"; + var status = [1,-2]; }else if(id=="updateStatement"){ var opname = "重算金额"; var opurl = "{:U('updateStatement')}"; @@ -510,7 +510,7 @@ return; } text = text.join(","); - + console.log(text); if(flag){ layer.confirm(opname+"仅会对"+opst+"的申请进行处理,选择中包含其他的状态的申请将被忽略,点击取消停止操作",{title:false}, function(index){ layer.close(index); From 64e2517b937b7df18dc0d100674054c74fe8ecae Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 2 Sep 2020 11:45:26 +0800 Subject: [PATCH 49/82] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=B8=A0=E9=81=93?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/FinanceController.class.php | 23 +++++++++++++++++++ .../Admin/View/Finance/payTypeStatistics.html | 4 ++-- Application/Admin/View/PayChannel/index.html | 8 +++---- Application/Admin/View/PayMerchant/index.html | 4 ++-- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 516b47bb0..4ecf1027c 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -1388,6 +1388,29 @@ class FinanceController extends ThinkController $cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值 } + $testOrderData = M('test_order', 'tab_') + ->where([ + 'pay_way'=>['egt',1], + 'pay_time'=>$time + ]) + ->field('pay_way,sum(pay_amount) as pay_amount') + ->group("pay_way") + ->select(); + foreach ($testOrderData as $key => $value) { + + if ($value['pay_way'] == NULL&&$value['pay_amount'] == NULL) { + continue; + } + + if (!array_key_exists($value['pay_way'], $cashStatistics)) { + $cashStatistics[$value['pay_way']] = $value; + $cashStatistics[$value['pay_way']]['pay_type'] = getPayType($value['pay_way']);//充值方式文字影视 + $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; + $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 + } + $cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值 + } + foreach ($cashStatistics as $key => $value) { $cashStatistics[$key]['pay_rate'] = ''; $cashStatistics[$key]['total'] = $value['pay_amount'] + $value['balance'];//添加列表合计 diff --git a/Application/Admin/View/Finance/payTypeStatistics.html b/Application/Admin/View/Finance/payTypeStatistics.html index a4ec034f3..0febbec2f 100644 --- a/Application/Admin/View/Finance/payTypeStatistics.html +++ b/Application/Admin/View/Finance/payTypeStatistics.html @@ -71,12 +71,12 @@ diff --git a/Application/Admin/View/PayChannel/index.html b/Application/Admin/View/PayChannel/index.html index b702c54b0..b45ad9642 100644 --- a/Application/Admin/View/PayChannel/index.html +++ b/Application/Admin/View/PayChannel/index.html @@ -70,12 +70,12 @@ @@ -252,7 +252,7 @@ 平台币直充总金额(2019.12.18号以前的无法对应游戏记录不显示在列表中,此项也不计入充值方式统计){$coinSum}0.00 - + 支付渠道 @@ -260,7 +260,7 @@ - + 支付渠道占比 diff --git a/Application/Admin/View/PayMerchant/index.html b/Application/Admin/View/PayMerchant/index.html index ce401e232..8b28cb7e4 100644 --- a/Application/Admin/View/PayMerchant/index.html +++ b/Application/Admin/View/PayMerchant/index.html @@ -70,12 +70,12 @@ From b39629fe0824ee83e9ebab879779470d2c136617 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 2 Sep 2020 19:52:13 +0800 Subject: [PATCH 50/82] =?UTF-8?q?=E8=A1=A5=E7=82=B9=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/AggregateFinanceStatementController.class.php | 2 +- .../Admin/Controller/CompanyStatementController.class.php | 4 ++-- Application/Admin/Controller/TimingController.class.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 3a71b06a4..4db9c689c 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -599,7 +599,7 @@ class AggregateFinanceStatementController extends ThinkController $invoice_data .= "\n纳税人识别号:".$data['second_party_info']['company_tax_no']; $invoice_data .= "\n开户银行:".$data['second_party_info']['opening_bank']; - $invoice_data .= "\n开户账号:".$data['second_party_info']['payee_name']; + $invoice_data .= "\n开户账号:".$data['second_party_info']['bank_account']; $invoice_data .= "\n开票内容:".$data['second_party_info']['invoice_item']; $invoice_data .= "\n注册地址及电话:".$data['second_party_info']['register_address'].",".$data['second_party_info']['register_phone']; diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 042994766..f0fd336da 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1470,8 +1470,8 @@ class CompanyStatementController extends ThinkController $amount_time['pay_way'] = ['egt',0]; foreach ($statement_info as $k => $v) { - $statement_begin_time = strtotime($v['statement_begin_time']); - $statement_end_time = strtotime($v['statement_end_time'])+86399; + $statement_begin_time = strtotime(str_replace('.','-',$v['statement_begin_time'])); + $statement_end_time = strtotime(str_replace('.','-',$v['statement_end_time']))+86399; $amount_time['_string'] = "payed_time between {$statement_begin_time} and {$statement_end_time} and relation_game_id={$v['relation_game_id']}"; $dataAmount = M("spend","tab_") diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index 5e4b29704..720765752 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -790,8 +790,8 @@ class TimingController extends AdminController { $compamy_info = M("promote","tab_")->where(['id'=>$promote_id,'company_id'=>$value['company_id']])->find(); if ($compamy_info) { foreach ($statement_info as $k => $v) { - $statement_begin_time = strtotime($v['statement_begin_time']); - $statement_end_time = strtotime($v['statement_end_time'])+86399; + $statement_begin_time = strtotime(str_replace('.','-',$v['statement_begin_time'])); + $statement_end_time = strtotime(str_replace('.','-',$v['statement_end_time']))+86399; $amount_time['tab_spend.pay_status'] = 1; $amount_time['pay_way'] = ['egt',0]; $amount_time['_string'] = "payed_time between {$statement_begin_time} and {$statement_end_time} and relation_game_id={$v['relation_game_id']}"; From af5878a98f7dc8a725adcb6be7ada6035a428091 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 2 Sep 2020 20:41:58 +0800 Subject: [PATCH 51/82] =?UTF-8?q?=E8=A1=A5=E7=82=B9=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E6=9C=89=E6=B5=81=E6=B0=B4=E7=9A=84=E5=B0=B1=E7=BB=99=E4=BA=88?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/AjaxController.class.php | 18 +++++++++++++++--- .../viewSpecialComplement.html | 5 ++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php index ea80320e6..459fcb2c6 100644 --- a/Application/Admin/Controller/AjaxController.class.php +++ b/Application/Admin/Controller/AjaxController.class.php @@ -567,14 +567,26 @@ class AjaxController extends ThinkController{ */ public function getPromoteGameList() { - $game_ids = I('game_ids'); + $company_id = $_REQUEST['company_id']; + + $spendData = M("spend use index(user_id)","tab_") + ->field("game_id") + ->join("left join tab_promote on tab_spend.promote_id=tab_promote.id") + ->where([ + 'company_id'=>$company_id, + 'pay_status'=>1, + 'pay_way'=>['egt',0] + ]) + ->group("game_id") + ->select(); - if ($game_ids) { - $map['relation_game_id'] = ['in',$game_ids]; + if ($spendData) { + $map['id'] = ['in',array_column($spendData,"game_id")]; } else { $this->ajaxReturn([]); } + $data = M("game","tab_") ->field("relation_game_id,relation_game_name") ->where($map) diff --git a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html index 78e728319..624cab528 100644 --- a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html +++ b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html @@ -631,9 +631,11 @@ }); var game_id = "{$_GET['game_id']??0}"; $("#company_id").on("change",function(){ + layer.load(2); var data = $(this).find("option:selected").data().value; + var company_id = $(this).find("option:selected").val(); - var url = "{:U('Ajax/getPromoteGameList')}"+"&game_ids="+data; + var url = "{:U('Ajax/getPromoteGameList')}"+"&game_ids="+data+"&company_id="+company_id; $.get(url,function(data){ var game = data; var gamestr = ''; @@ -646,6 +648,7 @@ } $("#relation_game_id").html(gamestr); $("#relation_game_id").select2(); + layer.closeAll("loading"); }) }); From f73a9033b30cde8c5dc96050e78909eb88206a2d Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 3 Sep 2020 09:53:26 +0800 Subject: [PATCH 52/82] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=8B=E6=B8=B8?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 5 ++-- .../CompanyStatementPoolController.class.php | 28 +++++------------- Public/Admin/excel/down_stream.xls | Bin 26624 -> 26624 bytes 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 0a9b2e21d..9b944d44e 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2166,9 +2166,10 @@ function excelDownStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_al } else {//游戏 $product_name = $value['game_name']; - $objPHPExcel->getActiveSheet()->getStyle('D'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00); - $objPHPExcel->getActiveSheet()->getStyle('E'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_000); + $objPHPExcel->getActiveSheet()->getStyle('D'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE); + $objPHPExcel->getActiveSheet()->getStyle('E'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE); $objPHPExcel->getActiveSheet()->getStyle('C'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_00); + $objPHPExcel->getActiveSheet()->getStyle('F'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_00); if($value['increment_ratio'] == 0){ $value['increment_ratio'] = 0; diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 34a6fa726..6b8c6daea 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -241,7 +241,7 @@ class CompanyStatementPoolController extends ThinkController } $cline = $line+1; if($is_export){ - $v['statement_money'] = "="; + $v['statement_money'] = "=ROUND("; } $row = 0; @@ -261,44 +261,30 @@ class CompanyStatementPoolController extends ThinkController if($is_export){ if($v['withdraw_type'] != 3) { - $val['sum_money'] = "=K{$line}*(L{$line}+M{$line})"; + $val['sum_money'] = "=ROUND(K{$line}*(L{$line}+M{$line}),2)"; } else { - $val['sum_money'] = "=K{$line}*(M{$line})"; + $val['sum_money'] = "=ROUND(K{$line}*(M{$line}),2)"; } -// $val['sum_money'] = "=J{$line}*(K{$line}+L{$line})"; $v['statement_money'] .= "N{$line}+"; }else{ $count['platform_amount'] += $val['pay_amount']; $count['sum_money'] += $val['sum_money']; } } - // if($is_export){ - // //J3*(K3+L3)+M3-N3 - // if($va['statement_type'] > 0){ //罚款服务器费用 - // $va['sum_money'] = "=J{$line}"; - // }else{ - // $va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}"; - // } - // }else{ - // $count['platform_amount'] += $va['pay_amount']; - // $count['sum_money'] += $va['sum_money']; - // } } $v['row'] = $row; if($is_export){ - if($v['withdraw_type'] != 3) { - $v['statement_money'] .="O{$cline}-P{$cline}"; + $v['statement_money'] .="O{$cline}-P{$cline},2)"; } else { - $v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1); + $v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1).",2)"; } -// dump($v['statement_money']);die(); } } if($is_export){ - $count["platform_amount"] = "=SUM(K2:K".$line.")"; - $count["sum_money"] = "=SUM(Q2:Q".$line.")"; + $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); diff --git a/Public/Admin/excel/down_stream.xls b/Public/Admin/excel/down_stream.xls index a8539a39d424c040e78dcfb0f96a69afd2d9569a..80c58286374190d8e6516ddf80b6c08a2bb097b9 100644 GIT binary patch delta 1276 zcmZWpU1%It6h3Emc6WBu-R#WH&dhGM&5A!H;3iuY!6NYoV-oGA+NMon64}^T`=d~N zQYlRkQ3~pVM~Dv=`cSkGENLd-lj|Y`d{9g!h$2dmJV>bzN(v$^>vv~1Tg17XbI&>V z`_4J{hgn$Xg>_zjS&v;98EtGY$gBF>8XuN_^lRxb@&mV4{)+ylH)hTb%8#*eapRs6 zCaJ}Lmp6@qOeczR+VEuEsK{`_mUk1L*oi(FHhSbW*hbR(0O9L^T`+99n0P=+NlU&@ z6lB$K{QHtyk$9Pw$tIS~RMD(ZA5}1>sh9TXdAcI`bdgu&!Spfq<$U@$ulljhPnc8k zS;pn8tYwB^r%abkx!dfA{fh01ZF%yR>G5tkAH=@JdS1$%E@zaMEz^^aO)sA&q8rT& z(FQ#Ovx}%v+C(!YnX%k37kKZrZBM?i+qFCA>{#p|JrS@h`6EE0GudTZ(wB|p z-5u-()nFEODs)LT>vBPLE^}E+-p|HRZ!Oy^b+A%9tW_B5)4PHSDftDgaPQbPc6!sc z*p&mw0v=Yvb#(?~rWN0No0a{4&U*viucqQ57xXQ=pB*XZhLTZS3KLGID93V-8p^SV z9+u0w({kByWWSS?0jEdKItEVuJLeHZE4ZS0$Aw;Wy2Wv)E%cezy1a#jDap~Vhv z$WI6F=c|6|P?h-!e`@Sgo*xVn*Hxov_sP~6qG5{BElMIrG!p30V|t1-#6nMl7ioJD zczWB@>1m3#y(sNR#*nA@Rdh{MpGOG|=||~+nza~o1n;UI#C3X>4kC#vrpg>516rXX z;EVy4hNaQrU>s>7RSV;kfL1&m$O+6S2DA?JWH3VX%J??(jNF(QDZiv18bCIsKsnwT zC+H|f9Pte39C#<`l$@G8lj2~1>V%rjsJ}h=Gp|g0nx4EAi}=Oo@6-wm0yUa9o9gxd zXO_LSd*t(4LC)1ma-}vPowF9RBxgtan=Nd64s)n7D#z_Ph$rRha}P;lw!%H~=j=N? z;lKXE68C-$@Gi&(L_Ok7NC)IPL|ygYkSwGm)w!vZx|pL>rZ=$Z6S6i}iZ<zqo62 KNBqi*>)OAAg)zMV delta 1224 zcmZWp-)|IE6h3Emc6Mf$?vL5ootf?0T|-1rkrs^>A8I3D0V!MB(zRCWELK~v35Ev) zi4mUkg(&cu^hF6zXksFjAtWZU)_*|zK(x^WjcKAWkzWxt#$RV>J~mW9)zB>aKb3Vlh_Tz z^fxD0V=6m5fiK{*^c?&C!g8^l%rZ3q!bE*sK#VnMD2gweS*ZMIDEVgS?2vqK)%Kof&6k^?h*= z-^kwQ#r5I*tUaX#FWg_ndv;wk?o@MuM#5Qk{Rot!?n#M`K2H8=r+}ZFsG?*a!QJj7 zIOTdt=&_aseL~`r_KI;#R4Kr``PmI6I$F_yK&7f!L ze0ys=PD7;8pOlms(T>nZh-oJ&5{r-`DAqwSL23u7w2R^$6sIRdG2#XM-INgDJSHU+ zksqc#!K`TFV^pJN7+2+c+bbeLv7pQ-$=QTiG2x6!R$Af;jfZ1jD>GJrX@);LJd$w){%D|`;oi!_h7CtvA` zhp)?`w1!mwuBX0cWT*NrJnbmzZFjBbm#5b%nDrcNYUrpmvN+^DhL5}fT=z=Y&?ri5 z3se`$*LluAy8nINup(Wp5nC1O61yRm68l3exHetxC@*s_ ghG(YK;1kBZS_zkCD)Ez_B;|MY)y#xH`23Rc4-wHD7XSbN From c0406a6f5287ab6149b6b834d8364c15f7afbba7 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 3 Sep 2020 11:16:51 +0800 Subject: [PATCH 53/82] =?UTF-8?q?=E4=B8=8A=E6=B8=B8=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...regateFinanceStatementController.class.php | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 3a71b06a4..e7860a83e 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -611,6 +611,96 @@ class AggregateFinanceStatementController extends ThinkController $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+8), $first_data);//户名 // $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+8), $data['pay_company']['payee_name']);//户名 // $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+9), $data['pay_company']['bank_account']);//银行账号 +// $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+10), $data['pay_company']['opening_bank']);//开户行 + if($data['withdraw_type'] == 1){ + $m = date('Y.m', $data['begintime']); + $fileName = "{$data['second_party_info']['partner']}&{$data['first_party_info']['partner']}-对账单{$m}"; + }else{ + $fileName = "{$data['second_party_info']['partner']}&{$data['first_party_info']['partner']}-对账单{$statement_begin_time}-{$statement_end_time}"; + } + ob_end_clean();//清除缓冲区,避免乱码 + header('pragma:public'); + header('Content-type:application/vnd.ms-excel;charset=utf-8;name="' . $fileName .'".xls'); + header("Content-Disposition:attachment;filename={$fileName}.xls");//attachment新窗口打印inline本窗口打印 + $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); + $objWriter->save('php://output'); + } + public function excelDownStreamPersonTemplate($data,$big_all_sum_money) { + + header("Content-type: text/html; charset=utf-8"); + error_reporting(E_ALL); + ini_set('display_errors', TRUE); + ini_set('display_startup_errors', TRUE); + + define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
'); + + date_default_timezone_set('Asia/Shanghai'); + Vendor("PHPExcel.PHPExcel"); + $objPHPExcel = new \PHPExcel(); + $objReader = \PHPExcel_IOFactory::createReader('Excel5'); + //设置模板文件 + $objPHPExcel = $objReader->load("Public/Admin/excel/aggregate_stream.xls"); + $statement_begin_time = date('Y.m.d', $data['begintime']);//对账开始时间 + $statement_end_time = date('Y.m.d',$data['endtime']);//对账截止时间 + + $objPHPExcel->getActiveSheet()->getStyle('A1')->getAlignment()->setWrapText(true); + $objPHPExcel->getActiveSheet()->setCellValue('A1', "《 {$data['channel_name']} 》结算单\n({$statement_begin_time}-{$statement_end_time})"); + if ($data['withdraw_type'] == '2') { + $objPHPExcel->getActiveSheet()->setCellValue('D2','补点比例'); + } + $line = 3; + foreach ($data['statement_info'] as $key => $value) { + $objPHPExcel->getActiveSheet()->insertNewRowBefore($line,1); + $objPHPExcel->getActiveSheet()->removeConditionalStyles(); + $objPHPExcel->getActiveSheet()->setCellValue('A'.$line, $value['begintime'] . '-' . $value['endtime']); + $product_name = $value['game_name']; + $objPHPExcel->getActiveSheet()->setCellValue('D'.$line, $value['ratio'] . '%'); + $objPHPExcel->getActiveSheet()->setCellValue('E'.$line, $value['fax_ratio'] . '%'); + $objPHPExcel->getActiveSheet()->setCellValue('C'.$line, $value['money']); + $objPHPExcel->getActiveSheet()->setCellValue('B'.$line, $product_name); + $objPHPExcel->getActiveSheet()->setCellValue('F'.$line, $value['ratio_money']); + + $objPHPExcel->getActiveSheet()->getStyle('A'.$line)->getFont()->setBold(false); + $objPHPExcel->getActiveSheet()->getStyle('B'.$line)->getFont()->setBold(false); + $objPHPExcel->getActiveSheet()->getStyle('C'.$line)->getFont()->setBold(false); + $objPHPExcel->getActiveSheet()->getStyle('D'.$line)->getFont()->setBold(false); + $objPHPExcel->getActiveSheet()->getStyle('E'.$line)->getFont()->setBold(false); + $objPHPExcel->getActiveSheet()->getStyle('F'.$line)->getFont()->setBold(false); + $line++; + } + $objPHPExcel->getActiveSheet()->setCellValue('C'.($line), $data['pay_money']);//合计-平台总额 + $objPHPExcel->getActiveSheet()->setCellValue('F'.($line), $data['ratio_money']);//合计-结算金额 + $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+1), $big_all_sum_money);//大写支付结算金额 + //甲方信息 + $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+3), $data['first_party_info']['partner']);//甲方 + $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+4), $data['first_party_info']['link_man']);//联系人 + $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+5), $data['first_party_info']['link_phone']);//联系电话 + $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+6), $data['first_party_info']['address']);//邮寄地址 +// $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+7), $data['second_party_info']['invoice_type']);//发票类型 + //乙方信息 + $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+3), $data['second_party_info']['partner']);//乙方 + $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+4), $data['second_party_info']['link_man']);//联系人 + $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+5), $data['second_party_info']['link_phone']);//联系电话 + $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+6), $data['second_party_info']['address']);//邮寄地址 + + //开票信息 +// $invoice_data = "发票类型:".$data['second_party_info']['invoice_type']; +// $invoice_data .= "\n发票抬头:".$data['second_party_info']['partner']; +// $invoice_data .= "\n纳税人识别号:".$data['second_party_info']['company_tax_no']; +// +// $invoice_data .= "\n开户银行:".$data['second_party_info']['opening_bank']; +// $invoice_data .= "\n开户账号:".$data['second_party_info']['payee_name']; +// $invoice_data .= "\n开票内容:".$data['second_party_info']['invoice_item']; +// $invoice_data .= "\n注册地址及电话:".$data['second_party_info']['register_address'].",".$data['second_party_info']['register_phone']; +// +// $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+7), $invoice_data);//乙方 + + $first_data = "户名:{$data['pay_company']['payee_name']}"; + $first_data .= "\n账号:{$data['pay_company']['bank_account']}"; + $first_data .= "\n开户行:{$data['pay_company']['opening_bank']}"; + $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+7), $first_data);//户名 +// $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+8), $data['pay_company']['payee_name']);//户名 +// $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+9), $data['pay_company']['bank_account']);//银行账号 // $objPHPExcel->getActiveSheet()->setCellValue('E'.($line+10), $data['pay_company']['opening_bank']);//开户行 if($data['withdraw_type'] == 1){ $m = date('Y.m', $data['begintime']); From bcdbb3d0a042e120934e4f74e52f6f3f6986fb74 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 3 Sep 2020 11:34:45 +0800 Subject: [PATCH 54/82] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E4=BF=9D=E7=95=99=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 5 +-- .../CompanyStatementController.class.php | 14 ++++---- .../CompanyStatementPoolController.class.php | 32 +++++++++---------- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 9b944d44e..39aa08532 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2036,9 +2036,10 @@ function excelSpecialComplementEmplate($data, $all_sum_money, $all_pay_amount, $ } else {//游戏 $product_name = $value['game_name']; - $objPHPExcel->getActiveSheet()->getStyle('D'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00); - $objPHPExcel->getActiveSheet()->getStyle('E'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_000); + $objPHPExcel->getActiveSheet()->getStyle('D'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE); + $objPHPExcel->getActiveSheet()->getStyle('E'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE); $objPHPExcel->getActiveSheet()->getStyle('C'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_00); + $objPHPExcel->getActiveSheet()->getStyle('F'.$line)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_00); if($data['withdraw_type'] != 3) { diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index f0fd336da..606d55be1 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -578,7 +578,7 @@ class CompanyStatementController extends ThinkController $cline = $line+1; if($is_export){ - $v['statement_money'] = "="; + $v['statement_money'] = "=ROUND("; } $row = 0; @@ -598,9 +598,9 @@ class CompanyStatementController extends ThinkController if($is_export){ if($v['withdraw_type'] != 3) { - $val['sum_money'] = "=K{$line}*(L{$line}+M{$line})"; + $val['sum_money'] = "=ROUND(K{$line}*(L{$line}+M{$line}),2)"; } else { - $val['sum_money'] = "=K{$line}*(M{$line})"; + $val['sum_money'] = "=ROUND(K{$line}*(M{$line}),2)"; } // $val['sum_money'] = "=J{$line}*(K{$line}+L{$line})"; $v['statement_money'] .= "N{$line}+"; @@ -625,17 +625,17 @@ class CompanyStatementController extends ThinkController if($is_export){ if($v['withdraw_type'] != 3) { - $v['statement_money'] .="N{$cline}-O{$cline}"; + $v['statement_money'] .="N{$cline}-O{$cline},2)"; } else { - $v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1); + $v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1).",2)"; } // dump($v['statement_money']);die(); } } if($is_export){ - $count["platform_amount"] = "=SUM(K2:K".$line.")"; - $count["sum_money"] = "=SUM(Q2:Q".$line.")"; + $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); diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 6b8c6daea..184d5d23b 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -332,9 +332,9 @@ class CompanyStatementPoolController extends ThinkController if($is_export){ if($v['withdraw_type'] != 3) { - $va['d_statement_money'] = "=D{$line}*(1-G{$line})*(E{$line}+F{$line})"; + $va['d_statement_money'] = "=ROUND(D{$line}*(1-G{$line})*(E{$line}+F{$line}),2)"; } else { - $va['d_statement_money'] = "=D{$line}*(F{$line})"; + $va['d_statement_money'] = "=ROUND(D{$line}*(F{$line}),2)"; } }else{ if ($v['withdraw_type'] != 3) { @@ -356,7 +356,7 @@ class CompanyStatementPoolController extends ThinkController if($is_export){ if ($v['withdraw_type'] != 3) { - $v['statement_money'] = "=SUM(H{$cline}:H{$line})+J{$cline}-I{$cline}"; + $v['statement_money'] = "=ROUND(SUM(H{$cline}:H{$line})+J{$cline}-I{$cline},2)"; } @@ -369,11 +369,11 @@ class CompanyStatementPoolController extends ThinkController } if($is_export){ - $count["platform_amount"] = "=SUM(D2:D".$line.")"; - $count["d_statement_money"] = "=SUM(H2:H".$line.")"; - $count["fine"] = "=SUM(I2:I".$line.")"; - $count["reward"] = "=SUM(J2:J".$line.")"; - $count["statement_money"] = "=SUM(K2:K".$line.")"; + $count["platform_amount"] = "=ROUND(SUM(D2:D".$line."),2)"; + $count["d_statement_money"] = "=ROUND(SUM(H2:H".$line."),2)"; + $count["fine"] = "=ROUND(SUM(I2:I".$line."),2)"; + $count["reward"] = "=ROUND(SUM(J2:J".$line."),2)"; + $count["statement_money"] = "=ROUND(SUM(K2:K".$line."),2)"; } // dd($infolist); $this->assign("data",$infolist); @@ -417,7 +417,7 @@ class CompanyStatementPoolController extends ThinkController $line ++; $va['company_ratio'] = 100-$va['ratio']; if($is_export){ - $va['d_statement_money'] = "=F{$line}*G{$line}"; + $va['d_statement_money'] = "=ROUND(F{$line}*G{$line},2)"; }else{ $va['d_statement_money'] = round($va['pay_amount']*$va['ratio']/100,2); $count['platform_amount'] += $va['pay_amount']; @@ -427,7 +427,7 @@ class CompanyStatementPoolController extends ThinkController } $v['matche_platform'] = $Partner[$v['company_id']]; if($is_export){ - $v['statement_money'] = "=SUM(K{$cline}:K{$line})+M{$cline}-L{$cline}"; + $v['statement_money'] = "=ROUND(SUM(K{$cline}:K{$line})+M{$cline}-L{$cline},2)"; }else{ $count['fine'] += $v['fine']; $count['reward'] += $v['reward']; @@ -437,12 +437,12 @@ class CompanyStatementPoolController extends ThinkController } if($is_export){ - $count["d_statement_money"] = "=SUM(K3:K".$line.")"; - $count["platform_amount"] = "=SUM(E3:E".$line.")"; - $count["platform_amount2"] = "=SUM(F3:F".$line.")"; - $count["fine"] = "=SUM(L3:L".$line.")"; - $count["reward"] = "=SUM(M3:M".$line.")"; - $count["statement_money"] = "=SUM(N3:N".$line.")"; + $count["d_statement_money"] = "=ROUND(SUM(K3:K".$line."),2)"; + $count["platform_amount"] = "=ROUND(SUM(E3:E".$line."),2)"; + $count["platform_amount2"] = "=ROUND(SUM(F3:F".$line."),2)"; + $count["fine"] = "=ROUND(SUM(L3:L".$line."),2)"; + $count["reward"] = "=ROUND(SUM(M3:M".$line."),2)"; + $count["statement_money"] = "=ROUND(SUM(N3:N".$line."),2)"; } // dd($infolist); $this->assign("data",$infolist); From c7af3bdb1d9f2640fb8c75a44a3fe2ec71f02438 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 3 Sep 2020 13:40:56 +0800 Subject: [PATCH 55/82] =?UTF-8?q?=E8=A1=A5=E7=82=B9=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/CompanyStatementController.class.php | 2 +- .../View/CompanyStatement/viewSpecialComplement.html | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 042994766..df578d116 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1181,7 +1181,7 @@ class CompanyStatementController extends ThinkController $radioMap['_string'] = "start_time < {$end_time}"; } $map['tab_spend.pay_status'] = 1; - $map['pay_way'] = ['egt',1]; + $map['pay_way'] = ['egt',0]; $data = M("spend","tab_") ->field("pay_amount,relation_game_id,relation_game_name,payed_time") diff --git a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html index 78e728319..3b43c077d 100644 --- a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html +++ b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html @@ -431,14 +431,16 @@ //时间数组定义用于判断当前选择的游戏是否有结算过的区间 var begin_time = []; var end_time = []; - var get_time = $(cval).parent(); - var row =$(cval).attr('rowspan'); for (var i=0; i= get_time.find('.begin_time').text()&&data[item]['begin_time'][item_sec] <= get_time.find('.end_time').text()) + || (data[item]['end_time'][item_sec] >= get_time.find('.begin_time').text()&&data[item]['end_time'][item_sec] <= get_time.find('.end_time').text()) + ||(data[item]['begin_time'][item_sec]<=get_time.find('.begin_time').text()&&data[item]['end_time'][item_sec]>=get_time.find('.end_time').text()))) { begin_time.push(get_time.find('.begin_time').text()); end_time.push(get_time.find('.end_time').text()); @@ -448,6 +450,7 @@ get_time = get_time.next(); } + for (var time in begin_time) { if ((begin_time[time]>=time_start && begin_time[time]<=time_end) || (end_time[time]>=time_start && end_time[time]<=time_end)||(begin_time[time]<=time_start && end_time[time] >= time_end)) { From df3b058b91e4a8a332f675f712489921a60a2cc3 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 3 Sep 2020 15:03:03 +0800 Subject: [PATCH 56/82] =?UTF-8?q?=E8=A1=A5=E7=82=B9=E6=AF=94=E4=BE=8B?= =?UTF-8?q?=E9=9D=9E=E8=B4=9F=E6=95=B0=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 18 +++++++------ .../viewSpecialComplement.html | 25 ++++++++++++++++--- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index df578d116..4bca64e9f 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1145,10 +1145,10 @@ class CompanyStatementController extends ThinkController foreach ($check_add as $key => $value) { - if ($value['statement_end_time'] >= $start_time && $value['statement_end_time']<=$end_time - ||$value['statement_begin_time']>=$start_time && $value['statement_begin_time']<=$end_time - ||$value['statement_begin_time']>=$start_time && $value['statement_end_time'] <= $end_time) - { +// if ($value['statement_end_time'] >= $start_time && $value['statement_end_time']<=$end_time +// ||$value['statement_begin_time']>=$start_time && $value['statement_begin_time']<=$end_time +// ||$value['statement_begin_time']<=$start_time && $value['statement_end_time'] >= $end_time) +// { $statementInfo = json_decode($value['statement_info'],true);; if ($value['company_type'] == 2) { @@ -1156,12 +1156,16 @@ class CompanyStatementController extends ThinkController } foreach ($statementInfo as $k => $v) { - if (in_array($v['relation_game_id'],$relation_game_data)) { - $this->ajaxReturn(['status'=>0,'data'=>[],'msg'=>"《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { + if (in_array($v['relation_game_id'], $relation_game_data)) { + $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + } } } - } +// } } diff --git a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html index 3b43c077d..12a9c0985 100644 --- a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html +++ b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html @@ -260,6 +260,7 @@ layer.msg("正在提交请勿重复提交..."); return; } + var is_zero = 0; layer.load(2); is_submit = 0; var time_start = $("#time_start").val(); @@ -293,7 +294,11 @@ sec_data['statement_begin_time'] = $(cval).next().find('.begin_time').text(); sec_data['statement_end_time'] = $(cval).next().find('.end_time').text(); statement_info.push(sec_data); - + if (sec_data['increment_ratio']<=0||sec_data['pay_amount']<=0) { + is_zero = 1; + layer.closeAll("loading"); + return; + } var _append = $(cval).parent(); var row = $(cval).attr('rowspan'); for (var i=0;i100) { $(this).val(100); ratio = 100; } - //最终的分配金额 var withdraw_amount = ((pay_amount * ratio)/100).toFixed(2); From 229d8d2a5056f23972a8bb858e81b38c6d65e7e0 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 3 Sep 2020 15:37:58 +0800 Subject: [PATCH 57/82] =?UTF-8?q?=E5=88=A4=E5=AE=9A=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=BD=95=E5=85=A5=E8=BF=87=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 4bca64e9f..27394764c 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1152,19 +1152,32 @@ class CompanyStatementController extends ThinkController $statementInfo = json_decode($value['statement_info'],true);; if ($value['company_type'] == 2) { - $statementInfo = $statementInfo['game_list']; - } - foreach ($statementInfo as $k => $v) { - if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time - ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time - ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { - if (in_array($v['relation_game_id'], $relation_game_data)) { - $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + foreach ($statementInfo as $sk => $sv) { + $statementInfos = $sv['game_list']; + foreach ($statementInfos as $k => $v) { + if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { + if (in_array($v['relation_game_id'], $relation_game_data)) { + $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + } + } + } + } + } else { + foreach ($statementInfo as $k => $v) { + if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { + if (in_array($v['relation_game_id'], $relation_game_data)) { + $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + } } } } + // } } From 65dc1dec9e78401414ce9d5ee3948d9abcc40534 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 3 Sep 2020 16:56:19 +0800 Subject: [PATCH 58/82] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E5=8A=9F=E8=83=BDbug=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index f0fd336da..c0353a959 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1368,7 +1368,7 @@ class CompanyStatementController extends ThinkController $statement_data = []; M()->startTrans(); foreach ($data as $key => $value) { - + $statement_data = []; $company_data = M("promote_company","tab_")->where(['id'=>$value['company_id']])->find(); $company_type = M("company_relation","tab_")->where("first_company_id={$value['company_id']} or second_company_id={$value['company_id']}")->find(); From ab7ae8063449322e1fed638f6fae9c185e9c069e Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 3 Sep 2020 18:04:17 +0800 Subject: [PATCH 59/82] =?UTF-8?q?=E8=A1=A5=E7=82=B9bug=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 35 +++++++++++++++++-- .../CompanyStatementPoolController.class.php | 7 +++- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index c0353a959..e6bc5ed65 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1368,14 +1368,16 @@ class CompanyStatementController extends ThinkController $statement_data = []; M()->startTrans(); foreach ($data as $key => $value) { + $begin_time = 99999999999; + $end_time = 0; $statement_data = []; $company_data = M("promote_company","tab_")->where(['id'=>$value['company_id']])->find(); $company_type = M("company_relation","tab_")->where("first_company_id={$value['company_id']} or second_company_id={$value['company_id']}")->find(); $insert['is_payment'] = $company_type['is_payment']; - $insert['statement_begin_time'] = strtotime($value['statement_begin_time']); - $insert['statement_end_time'] = strtotime($value['statement_end_time']); +// $insert['statement_begin_time'] = strtotime($value['statement_begin_time']); +// $insert['statement_end_time'] = strtotime($value['statement_end_time']); $insert['withdraw_type'] = $withdraw_type; $insert['company_belong'] = $company_data['company_belong']; $insert['company_name'] = $company_data['company_name']; @@ -1470,12 +1472,23 @@ class CompanyStatementController extends ThinkController $amount_time['pay_way'] = ['egt',0]; foreach ($statement_info as $k => $v) { + $statement_begin_time = strtotime(str_replace('.','-',$v['statement_begin_time'])); $statement_end_time = strtotime(str_replace('.','-',$v['statement_end_time']))+86399; + if ($statement_begin_time<$begin_time) { + $begin_time = $statement_begin_time; + } + + if ($statement_end_time>$end_time) { + $end_time = $statement_end_time; + } + + $amount_time['_string'] = "payed_time between {$statement_begin_time} and {$statement_end_time} and relation_game_id={$v['relation_game_id']}"; $dataAmount = M("spend","tab_") - ->field("pay_amount,relation_game_id,relation_game_name,payed_time,game_type_name,substring_index(substring_index(promote.`chain`,'/',2),'/',-1) promote_id,chain,admin_id") + ->field("pay_amount,relation_game_id,relation_game_name,payed_time,game_type_name, + CASE WHEN substring_index(substring_index(`chain`,'/',2),'/',-1) !='' THEN substring_index(substring_index(`chain`,'/',2),'/',-1) ELSE promote_id END promote_id,chain,admin_id") ->join("left join tab_promote promote on tab_spend.promote_id=promote.id") ->join("left join tab_game game on tab_spend.game_id=game.id") ->where($amount_time) @@ -1525,9 +1538,25 @@ class CompanyStatementController extends ThinkController $insert['statement_info'] = json_encode($statement_insert); } else { + $insert['statement_info'] = json_encode($statement_info); + foreach ($statement_info as $k => $v) { + $statement_begin_time = strtotime(str_replace('.','-',$v['statement_begin_time'])); + $statement_end_time = strtotime(str_replace('.','-',$v['statement_end_time']))+86399; + + if ($statement_begin_time<$begin_time) { + $begin_time = $statement_begin_time; + } + + if ($statement_end_time>$end_time) { + $end_time = $statement_end_time; + } + } } + $insert['statement_begin_time'] = $begin_time; + $insert['statement_end_time'] = $end_time; + if ($company_type['first_company_id'] == $value['company_id']) { $insert['first_party_info'] = json_encode($proCompany_info); $insert['second_party_info'] = json_encode($secord_info); diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 34a6fa726..72ac9b7d5 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -799,7 +799,12 @@ class CompanyStatementPoolController extends ThinkController if($re_op){ //公司及上游回退 if($db_res['company_type'] == 2){ - $this->retry($db_res); //个人重算 + + if($db_res['withdraw_type'] == 3) { + $this->cancelCompanyPool($db_res);//公司撤回 + } else { + $this->retry($db_res); //个人重算 + } }else{ $this->cancelCompanyPool($db_res);//公司撤回 } From ba1778c112f600ce2e8ebff30f12ee474d483b6d Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 3 Sep 2020 18:20:29 +0800 Subject: [PATCH 60/82] =?UTF-8?q?=E5=85=AC=E5=8F=B8=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=AE=9D=E6=89=93=E6=AC=BE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/PromoteCompany/edit.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index 842c120a9..c064a26d4 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -421,10 +421,10 @@ 选择否将不能进行线上打款 From 9f0c56d753562c6ccbe620aa9d26cce316df4fb0 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 3 Sep 2020 19:52:55 +0800 Subject: [PATCH 61/82] =?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/Home/Controller/DownloadController.class.php | 2 +- Application/Home/Controller/QueryController.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index b81a44233..fd917bb7f 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -4537,7 +4537,7 @@ public function iosDetailExcelInfo($id,$map) { $begin = $defaultBegin; $end = $defaultEnd; if ($time != '') { - if (strpos($time, $delimiter) == -1) { + if (strpos($time, $delimiter) === false) { $begin = strtotime($time . ' 00:00:00'); $end = strtotime($time . ' 23:59:59'); } else { diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 5ce3deb40..90c411456 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -2014,7 +2014,7 @@ class QueryController extends BaseController $begin = $defaultBegin; $end = $defaultEnd; if ($time != '') { - if (strpos($time, $delimiter) == -1) { + if (strpos($time, $delimiter) === false) { $begin = strtotime($time . ' 00:00:00'); $end = strtotime($time . ' 23:59:59'); } else { From 7ef0f125c1db6f9f2062cedd2d4f7f5de307ec09 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 4 Sep 2020 09:36:48 +0800 Subject: [PATCH 62/82] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/CompanyStatementController.class.php | 11 ++++++++++- Application/Admin/View/CompanyStatement/lists.html | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 98feeb66e..f5e6e06d0 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -372,7 +372,16 @@ class CompanyStatementController extends ThinkController public function delStatement(){ if(!isset($_REQUEST['ids'])) $this->error("参数错误"); $ids = $_REQUEST['ids']; - $dbres = $this->DBModel->where("id in ({$ids}) and verify_status = 0")->delete(); +// $dbres = $this->DBModel->where("id in ({$ids}) and verify_status = 0")->delete(); + $dbres = $this->DBModel->where("id in ({$ids})")->select(); + foreach ($dbres as $key=>$value) { + if($value['withdraw_type'] !=3) { + $this->DBModel->where("id = {$value['id']} and verify_status = 0")->delete(); + } else { + $this->DBModel->where("id = {$value['id']}")->delete(); + } + + } addOperationLog(['op_type'=>2,'key'=>$ids,"op_name"=>"删除结算单",'url'=>U('lists')]); $this->ajaxReturn(array( 'status' => 1, diff --git a/Application/Admin/View/CompanyStatement/lists.html b/Application/Admin/View/CompanyStatement/lists.html index bc77a6907..824f5671c 100644 --- a/Application/Admin/View/CompanyStatement/lists.html +++ b/Application/Admin/View/CompanyStatement/lists.html @@ -494,6 +494,10 @@ var flag = false; var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + if (id=="delStatement"&&$(elem).data("type")==3) { + return $(elem).val(); + } + if($.inArray( $(elem).data("status"),status) == -1||(id=="updateStatement" && $(elem).data("type")==3)){ flag = true; }else{ From c1222cd46a0100f6245589d61bedcabdf9e81993 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 4 Sep 2020 10:42:26 +0800 Subject: [PATCH 63/82] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E6=AF=94=E4=BE=8B=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatement/viewSpecialComplement.html | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html index 3a0cc3dc3..7094ad59f 100644 --- a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html +++ b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html @@ -236,13 +236,15 @@ format: 'yyyy-mm-dd', language:"zh-CN", minView:2, - autoclose:true + autoclose:true, + endDate : new Date() }); $('#time_end').datetimepicker({ format: 'yyyy-mm-dd', language:"zh-CN", minView:2, - autoclose:true + autoclose:true, + endDate : new Date() }); $('#datetimepicker').datetimepicker({ @@ -572,6 +574,8 @@ $('.complement').change(function() { //获取总流水 var pay_amount = parseFloat($(this).parent().prev().prev().text()); + var show_ratio = $(this).parent().prev().text(); + show_ratio = parseFloat(show_ratio.slice(0,show_ratio.length-1)); //计算最终分配比率 var ratio = parseFloat($(this).val()); @@ -580,10 +584,10 @@ $(this).val(0); ratio = 0; } - - if (ratio>100) { - $(this).val(100); - ratio = 100; + // console.log(ratio+show_ratio); + if ((ratio+show_ratio)>100) { + $(this).val(100-show_ratio); + ratio = 100-show_ratio; } //最终的分配金额 var withdraw_amount = ((pay_amount * ratio)/100).toFixed(2); From 95799193754292f5480076ee5177afd96f52d750 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 4 Sep 2020 12:12:51 +0800 Subject: [PATCH 64/82] =?UTF-8?q?=E6=AF=94=E4=BE=8B=E7=A9=BA=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/CompanyStatement/viewSpecialComplement.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html index 7094ad59f..b23770a61 100644 --- a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html +++ b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html @@ -535,10 +535,10 @@ } $('#tablebox').find('tbody').prepend(html); - complementChange(); DeleteTd(); caculateAmount(); + } } else { @@ -584,6 +584,10 @@ $(this).val(0); ratio = 0; } + if(!ratio) { + $(this).val(0); + ratio=0; + } // console.log(ratio+show_ratio); if ((ratio+show_ratio)>100) { $(this).val(100-show_ratio); @@ -596,6 +600,7 @@ caculateAmount(); }); } + //删除操作 function DeleteTd() { From 5a184bbee19279ef673791e88a6b97753a86d78a Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 4 Sep 2020 13:39:30 +0800 Subject: [PATCH 65/82] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/ApplyController.class.php | 112 ++++-------------- .../Home/Controller/BaseController.class.php | 24 ++++ .../Home/View/default/Apply/feature.html | 39 +----- 3 files changed, 55 insertions(+), 120 deletions(-) diff --git a/Application/Home/Controller/ApplyController.class.php b/Application/Home/Controller/ApplyController.class.php index 1fd33a97a..a45c9fbc6 100644 --- a/Application/Home/Controller/ApplyController.class.php +++ b/Application/Home/Controller/ApplyController.class.php @@ -217,104 +217,42 @@ class ApplyController extends BaseController //查看游戏资料专区 public function feature($p = 0, $type = 0) { - $promoteId = empty(I('promote_id')) ? PID : I('promote_id');//搜索的渠道ID - $promoteRole = empty(I('promote_role')) ? 1 : I('promote_role');//渠道角色 - //$parentPromoteId = getParentPromoteId($promoteId);//上级渠道ID - $thisParentPromoteId = getParentPromoteId(PID);//本账号上级渠道ID + $map = ['_string' => '1=1']; + $map['online_status'] = 1;//开发者游戏上线状态 + $map['down_port'] = 1;//游戏端口 第三方接口不能申请 + $map['game_status'] = 1;//游戏状态 + $map['developers'] = 0; //平台游戏(官网游戏,非开发者游戏) -// $addPermission = 1;//是否有添加游戏权限 -// if ($thisParentPromoteId == 0 && $promoteRole == 3) { -// $addPermission = 0; -// } - - $map['tab_game.online_status'] = 1;//开发者游戏上线状态 - $map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请 - $map['tab_game.game_status'] = 1;//游戏状态 - $map['tab_game.developers'] = 0; //平台游戏(官网游戏,非开发者游戏) - - $applyPromote = M('apply', 'tab_')->field('game_id')->where(['promote_id' => $promoteId])->select(); - $noDeveloperGameArr = array(); - - foreach ($applyPromote as $key => $value) { - $applyPromoteGameId = $value['game_id']; - $gameInfo = M('Game', 'tab_') - ->field('id,icon,game_name,features,sdk_version,game_size,game_type_name,relation_game_name,developers') - ->where(['id' => $applyPromoteGameId])->select(); - if ($gameInfo[0]['developers'] > 0) { - unset($gameInfo[0]['developers']); - $noDeveloperGameArr[] = $gameInfo[0]['id']; //非开发者游戏 - } - } - - - $page = intval($p); - $page = $page ? $page : 1; //默认显示第一页数据 - - if (isset($_REQUEST['row'])) { - $row = $_REQUEST['row']; + $promote = $this->getLoginPromote(); + $promoteService = new PromoteService(); + $gameIds = $promoteService->getVisibleGameIds($promote); + if (count($gameIds) > 0) { + $map['id'] = ['in', $gameIds]; } else { - $row = 10; + $map['_string'] .= ' and 1<>1'; } - $map['_logic'] = 'and'; + if (!empty(I('game_id'))) { - $thisRelationGameName = M('Game', 'tab_')->where(array('id' => I('game_id')))->getField('relation_game_name'); - - $map['tab_game.relation_game_name'] = ['like', $thisRelationGameName]; - $where['_complex'] = $map; - // $where['tab_game.id'] = ['in',$noDeveloperGameArr]; - // $where['_logic']='or'; - } else { - $where['_complex'] = $map; - if (empty($noDeveloperGameArr)) { - $where['tab_game.id'] = ['in', '-100']; + $relationGameId = M('game', 'tab_')->where(array('id' => I('game_id')))->getField('relation_game_id'); + if ($relationGameId) { + $map['_string'] .= ' and relation_game_id=' . $relationGameId; } else { - $where['tab_game.id'] = ['in', $noDeveloperGameArr]; + $map['_string'] .= ' and 1<>1'; } - - $where['_logic'] = 'or'; } - $data = M('Game', 'tab_') - ->field('tab_game.id,tab_game.icon,tab_game.game_name,tab_game.features,tab_game.sdk_version,tab_game.game_size,tab_game.game_type_name,tab_game.relation_game_name,ta_1.id as apply_id_1') - ->join('left join tab_apply as ta_1 on tab_game.id = ta_1.game_id and ta_1.offline_status = 0 and ta_1.promote_id = ' . $promoteId)//查询是否拥有该游戏 - ->where($where) - ->order('tab_game.developers desc,tab_game.sort desc,tab_game.id desc') - ->page($page, $row) - ->select(); - //$AllData = array_merge($noDeveloperGameArr,$data); - - /* 查询记录总数 */ - $count = M("Game", "tab_") - ->field('tab_game.id') + $query = M('game', 'tab_') + ->field('id,icon,game_name,features,sdk_version,game_size,game_type_name,relation_game_name') ->where($map) - ->select(); - $count = count($count); - - //分页 - $parameter['p'] = I('get.p', 1); - $parameter['row'] = I('get.row'); - $parameter['type'] = $type; - $parameter['promote_role'] = $promoteRole; - empty(I('promote_id')) || $parameter['promote_id'] = I('promote_id'); - - $page = set_pagination($count, $row, $parameter); - if ($page) { - $this->assign('_page', $page); - } - - $this->assign('list_data', $data); - $this->assign("count", $count); - $this->assign("promoteId", $promoteId); - // $this->assign('parentPromoteId', $parentPromoteId); - $this->assign('thisParentPromoteId', $thisParentPromoteId); - // $this->assign('promoteRole', $promoteRole); - $this->assign('pID', PID); - //$this->assign('promoteData', getAllPromoteListByType($promoteRole)); -// $this->assign('addPermission', $addPermission); - // $this->assign('type', $type); + ->order('developers desc,sort desc,id desc'); - $this->meta_title = "申请游戏"; + list($records, $pagination, $count) = $this->paginate($query); + $this->assign('pagination', $pagination); + $this->assign('records', $records); + $this->assign('count', $count); + $this->assign('games', $this->getSelectGames()); + $this->meta_title = "资料专区"; $this->display(); } diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index fa876e441..fae35173b 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -410,4 +410,28 @@ class BaseController extends HomeController } return false; } + + public function getSelectGames() + { + $query = M('game', 'tab_'); + $map = []; + $map['apply_status'] = 1; + $map['online_status'] = 1; + $map['down_port'] = 1; + + $promote = $this->getLoginPromote(); + $promoteService = new PromoteService(); + $gameIds = $promoteService->getVisibleGameIds($promote); + if (count($gameIds) > 0) { + $map['id'] = ['in', $gameIds]; + } else { + $map['_string'] = '1<>1'; + } + + return M('game', 'tab_') + ->field('id,game_name,sdk_version,relation_game_name,icon,relation_game_id') + ->where($map) + ->group('relation_game_id') + ->select(); + } } diff --git a/Application/Home/View/default/Apply/feature.html b/Application/Home/View/default/Apply/feature.html index 86e5dd89c..024d4d6fb 100644 --- a/Application/Home/View/default/Apply/feature.html +++ b/Application/Home/View/default/Apply/feature.html @@ -146,9 +146,9 @@
@@ -163,7 +163,7 @@
    - +
    • @@ -171,7 +171,7 @@
    - +
  • @@ -186,37 +186,10 @@

    {$vo.features}

    -
    - - -
    - 查看详情 -
    @@ -226,7 +199,7 @@
- {$_page} + {$pagination}
From a6d7adb87b78abc92e0980ea69a8bbffb7461762 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 4 Sep 2020 14:19:12 +0800 Subject: [PATCH 66/82] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Promote/add.html | 29 +++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/Promote/add.html b/Application/Admin/View/Promote/add.html index d0d3561f8..e9dcab610 100644 --- a/Application/Admin/View/Promote/add.html +++ b/Application/Admin/View/Promote/add.html @@ -2,10 +2,33 @@ + - +