diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index e1a3a7bcf..8de0b0f1d 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -8,10 +8,10 @@ namespace Admin\Controller; class AggregateFinanceStatementController extends ThinkController { public $verify_status = [ - "-1"=>"审核拒绝", + "-1"=>"审批拒绝", "0"=>"未申请开票", "1"=>"申请开票", - "2"=>"审核同意", + "2"=>"审批同意", "3"=>"已开票", "4"=>"已上传凭证", "5"=>"已到账" @@ -110,7 +110,8 @@ class AggregateFinanceStatementController extends ThinkController $data[$key]['oplist'] = $this->OpAuth($value); } - $count = M("aggregate_statement","tab_")->field("count(id) count,SUM(ratio_money) ratio_money,SUM(pay_money) pay_money")->where($map)->find(); + $count = M("aggregate_statement","tab_")->field("count(id) count,SUM(ratio_money) ratio_money")->where($map)->find(); + $pay_money_count = M("aggregate_statement","tab_")->field("SUM(pay_money) pay_money")->where($map)->where("withdraw_type <> 2")->find()['pay_money']; //分页 $parameter['p'] = $page; @@ -123,7 +124,7 @@ class AggregateFinanceStatementController extends ThinkController $this->assign('menubtn',$this->menuAuth()); $this->assign('data',$data); $this->assign('total',$count['ratio_money']); - $this->assign('pay_money',$count['pay_money']); + $this->assign('pay_money',$pay_money_count); $this->assign('channel',$this->getAggChannel()); $this->assign('verify_status',$this->verify_status); $this->display(); diff --git a/Application/Admin/View/AggregateFinanceStatement/createStatement.html b/Application/Admin/View/AggregateFinanceStatement/createStatement.html index 15b16ea59..c2786ac5e 100644 --- a/Application/Admin/View/AggregateFinanceStatement/createStatement.html +++ b/Application/Admin/View/AggregateFinanceStatement/createStatement.html @@ -224,10 +224,10 @@ 结算时间 产品 - 平台总额 + 平台总额(元) 分成比例 税费费率 - 结算金额 + 结算金额(元) @@ -408,20 +408,20 @@ ${it.begintime}~${it.endtime} ${it.game_name} - ${it.money}元 + ${it.money} % % - ${it.ratio_money}元 + ${it.ratio_money} {@/each} 合计 - ${count.pay_money}元 + ${count.pay_money} - ${count.ratio_money}元 + ${count.ratio_money} 本月分成总金额(人民币大写): diff --git a/Application/Admin/View/AggregateFinanceStatement/editStatement.html b/Application/Admin/View/AggregateFinanceStatement/editStatement.html index 319ccda07..0a4759a80 100644 --- a/Application/Admin/View/AggregateFinanceStatement/editStatement.html +++ b/Application/Admin/View/AggregateFinanceStatement/editStatement.html @@ -210,10 +210,10 @@ 结算时间 产品 - 平台总额 + 平台总额(元) 分成比例 税费费率 - 结算金额 + 结算金额(元) @@ -394,20 +394,20 @@ ${it.begintime}~${it.endtime} ${it.game_name} - ${it.money}元 + ${it.money} % % - ${it.ratio_money}元 + ${it.ratio_money} {@/each} 合计 - ${count.pay_money}元 + ${count.pay_money} - ${count.ratio_money}元 + ${count.ratio_money} 本月分成总金额(人民币大写): diff --git a/Application/Admin/View/AggregateFinanceStatement/lists.html b/Application/Admin/View/AggregateFinanceStatement/lists.html index f37b6fd03..4715c0911 100644 --- a/Application/Admin/View/AggregateFinanceStatement/lists.html +++ b/Application/Admin/View/AggregateFinanceStatement/lists.html @@ -49,7 +49,7 @@
@@ -89,7 +89,7 @@
% % - {$it.ratio_money}元 + {$it.ratio_money} @@ -214,10 +214,10 @@ 合计 - {$data.statement_count.pay_money}元 + {$data.statement_count.pay_money} - {$data.statement_count.ratio_money}元 + {$data.statement_count.ratio_money} 本月分成总金额(人民币大写): diff --git a/Application/Base/Service/GameSourceService.class.php b/Application/Base/Service/GameSourceService.class.php index 4af55713c..17971be6b 100644 --- a/Application/Base/Service/GameSourceService.class.php +++ b/Application/Base/Service/GameSourceService.class.php @@ -229,6 +229,10 @@ class GameSourceService { $gameSourceUrl = $this->getGameSourceUrl($gameSource); if ($gameSource == null || !file_exists($gameSourceUrl)) { M('apply', 'tab_')->where(['id' => $apply['id']])->setField('enable_status', -1); + return [ + 'status' => false, + 'message' => '打包失败,原包或原包路径不存在!', + ]; } /* 检测是否存在投放申请,存在则更改投放申请信息,否则进行渠道打包 */ @@ -351,20 +355,27 @@ class GameSourceService { 'base_uri' => C('PACKAGE_CHUNK_URL'), 'timeout' => 30.0, ]); - $response = $client->post('/upload', [ - 'verify' => false, - 'form_params' => [ - 'file' => $localFilePath, - 'dest' => $distFilePath, - 'is_delete_local' => ($isDeleteLocal ? 1 : 0), - ] - ]); - $result = (string)$response->getBody(); - $result = json_decode($result, true); - if (!$result) { + try { + $response = $client->post('/upload', [ + 'verify' => false, + 'form_params' => [ + 'file' => $localFilePath, + 'dest' => $distFilePath, + 'is_delete_local' => ($isDeleteLocal ? 1 : 0), + ] + ]); + $result = (string)$response->getBody(); + $result = json_decode($result, true); + if (!$result) { + return [ + 'status' => false, + 'message' => '请求异常', + ]; + } + } catch (\Exception $e) { return [ 'status' => false, - 'message' => '请求打包失败', + 'message' => '请求异常: ' . $e->getMessage(), ]; } return $result;