上下游聚合打款信息修改

master
zhengyongxing 4 years ago
parent fd334245c2
commit 62f4ce3362

@ -2,6 +2,7 @@
namespace Admin\Controller;
use Base\Tool\AggregateClient;
use User\Api\UserApi as UserApi;
use Think\Controller;
@ -13,6 +14,8 @@ class PartnerController extends ThinkController
{
private $modelName = 'Partner';
public $OpAuthList=[];
public $aggregatePackageName = [];
public function _initialize()
{
$this->admininfo = $_SESSION['onethink_admin']['user_auth'];
@ -61,6 +64,7 @@ class PartnerController extends ThinkController
$is_export= false;
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
$is_export = true;
$this->getAggregatePackage();
}
//获取分页数据
@ -85,7 +89,7 @@ class PartnerController extends ThinkController
$partner_ids = $partner_ids ? $partner_ids : [0];
$game_map['partner_id'] = ["in",$partner_ids];
$games = M("game","tab_")->alias('g')
->field("g.game_type_name,g.relation_game_name,g.original_package_name,g.partner_id,g.relation_game_id as id")
->field("g.game_type_name,g.relation_game_name,g.original_package_name,g.partner_id,g.relation_game_id as id,unique_code")
->where($game_map)
->group('relation_game_id')
->select();
@ -141,6 +145,8 @@ class PartnerController extends ThinkController
$val["row"] = 1;
}
$val['original_package_name'] = $val['original_package_name'] ?: '-';
$val['aggregate_gamename'] = $this->aggregatePackageName[$val['unique_code']];
$parseGames[$val['partner_id']][] = $val;
}
@ -630,5 +636,14 @@ class PartnerController extends ThinkController
return $resarr;
}
protected function getAggregatePackage() {
$client = new AggregateClient();
$result = $client->api('aggregate-gamename', []);
$this->aggregatePackageName = $result['data'];
}
}

@ -2,6 +2,7 @@
namespace Admin\Controller;
use Base\Tool\AggregateClient;
use mysql_xdevapi\Exception;
use User\Api\UserApi as UserApi;
use OSS\OssClient;
@ -17,6 +18,8 @@ class PromoteCompanyController extends ThinkController
{
private $modelName = 'PromoteCompany';
public $ratio = [];
public $aggregatePackageName = [];
public function _initialize()
{
$this->admininfo = $_SESSION['onethink_admin']['user_auth'];
@ -29,6 +32,7 @@ class PromoteCompanyController extends ThinkController
$is_export= false;
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
$is_export = true;
$this->getAggregatePackage();
}
$map = [];
$promotemap=[];
@ -41,6 +45,7 @@ class PromoteCompanyController extends ThinkController
$c_id = throwPromoteIdToCompanyId($pro_id);
$map["_string"]="id in ({$c_id})";
}
//市场部权限end
if($company_name) $map['tab_promote_company.company_name'] = array('like',"%{$company_name}%");
@ -112,10 +117,22 @@ class PromoteCompanyController extends ThinkController
if(!empty($companyres)){
foreach($companyres as $k=>&$v){
$tmpr = D("CompanyRelation")->getCompanyRelation(2,$v['id']);
$v["settlement_type"] = $tmpr['settlement_type'];
$v["collection"] = $tmpr['collection'];
$v["invoice_type"] = $tmpr['invoice_type'];
$v["invoice_content"] = $tmpr['invoice_content'];
if ($tmpr['is_payment']==1) {
$v['bank_address'] = $v['ali_user'];
$v['bank_card'] = $v['ali_account'];
$v['bank_name'] = '--';
}
$v['is_payment'] = ($tmpr['is_payment']==1) ? '是' : '否';
$v["company_belong"] = getCompanyBlong($v["company_belong"]);
$v["develop_type"] = getCompanyRelation($v["develop_type"]);
@ -163,7 +180,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);
@ -1335,10 +1352,12 @@ class PromoteCompanyController extends ThinkController
}
//获取游戏基础信息
protected function getGameInfo($game_ids){
$gameinfo = [];
$dbres = M("Game","tab_")->where("relation_game_id in ($game_ids)")->field("relation_game_id,relation_game_name,game_type_name,original_package_name")->group("relation_game_id")->select();
$dbres = M("Game","tab_")->where("relation_game_id in ($game_ids)")->field("relation_game_id,relation_game_name,game_type_name,original_package_name,unique_code")->group("relation_game_id")->select();
foreach($dbres as $k=>$v){
$v['aggregate_gamename'] = $this->aggregatePackageName[$v['unique_code']];
$gameinfo[$v['relation_game_id']] = $v;
}
return $gameinfo;
@ -1373,6 +1392,16 @@ class PromoteCompanyController extends ThinkController
}
}
protected function getAggregatePackage() {
$client = new AggregateClient();
$result = $client->api('aggregate-gamename', []);
$this->aggregatePackageName = $result['data'];
}

@ -202,7 +202,7 @@
</tr>
<tr>
<td class="l">是否有打款流程:</td>
<td class="l">是否支付宝打款:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>

@ -104,10 +104,10 @@
<th >产品类型</th>
<th >结算周期</th>
<th colspan="2">游戏分成比例</th>
<th >户名</th>
<th >银行账号</th>
<th >户名</th>
<th >账号</th>
<th >开户行</th>
<th >支付宝账号</th>
<!-- <th >支付宝账号</th>-->
<th >是否为收款方</th>
<th >是否有预付款</th>
<th >预付款金额</th>
@ -160,7 +160,7 @@
<td rowspan="{$vo.rowspan}">{$vo.bank_user|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.bank_card|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.bank_name|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.alipay_user|default="------"}</td>
<!-- <td rowspan="{$vo.rowspan}">{$vo.alipay_user|default="&#45;&#45;&#45;&#45;&#45;&#45;"}</td>-->
<td rowspan="{$vo.rowspan}">{$vo.is_received|default="否"}</td>
<td rowspan="{$vo.rowspan}">{$vo.is_surplus|default="否"}</td>

@ -159,10 +159,10 @@
<th >结算周期</th>
<th colspan="2">游戏分成比例</th>
<th >户名</th>
<th >银行账号</th>
<th >户名</th>
<th >账号</th>
<th >开户行</th>
<th >支付宝账号</th>
<!-- <th >支付宝账号</th>-->
<th >操作</th>
</tr>
</thead>
@ -196,7 +196,7 @@
<td rowspan="{$vo.rowspan}">{$vo.bank_card|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.bank_name|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.alipay_user|default="------"}</td>
<!-- <td rowspan="{$vo.rowspan}">{$vo.alipay_user|default="&#45;&#45;&#45;&#45;&#45;&#45;"}</td>-->
<td rowspan="{$vo.rowspan}">
<a href="{:U('CpJuheCompany/detail',array('id'=>$vo['id']))}">查看</a>

@ -176,20 +176,20 @@
</td>
</tr>
<tr>
<td class="l noticeinfo">结算包名</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="0" name="select_package_name" <eq name="data['select_package_name']" value="0">checked="checked"</eq>> 原包名
</label>
<label>
<input type="radio" class="inp_radio" value="1" name="select_package_name" <eq name="data['select_package_name']" value="1">checked="checked"</eq>> 现包名
</label>
</span>
<span class="notice-text">用于上游结算时显示的游戏名称,修改后将同步关联游戏</span>
</td>
</tr>
<!-- <tr>-->
<!-- <td class="l noticeinfo">结算包名</td>-->
<!-- <td class="r table_radio">-->
<!-- <span class="form_radio table_btn">-->
<!-- <label>-->
<!-- <input type="radio" class="inp_radio" value="0" name="select_package_name" <eq name="data['select_package_name']" value="0">checked="checked"</eq>> 原包名-->
<!-- </label>-->
<!-- <label>-->
<!-- <input type="radio" class="inp_radio" value="1" name="select_package_name" <eq name="data['select_package_name']" value="1">checked="checked"</eq>> 现包名-->
<!-- </label>-->
<!-- </span>-->
<!-- <span class="notice-text">用于上游结算时显示的游戏名称,修改后将同步关联游戏</span>-->
<!-- </td>-->
<!-- </tr>-->
<tr>
<td class="l">聚合游戏标识:</td>
@ -720,6 +720,22 @@
<span class="notice-text">设置游戏扶持比例</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">结算包名</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="0" name="select_package_name" <eq name="data['select_package_name']" value="0">checked="checked"</eq>> 原包名
</label>
<label>
<input type="radio" class="inp_radio" value="1" name="select_package_name" <eq name="data['select_package_name']" value="1">checked="checked"</eq>> 现包名
</label>
</span>
<span class="notice-text">用于上游结算时显示的游戏名称,修改后将同步关联游戏</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">ios版支付方式</td>
<td class="r table_radio table_radio2">

@ -56,13 +56,14 @@
<th>原包名</th>
<th>现包名</th>
<th>聚合包名</th>
<th>产品类型</th>
<th colspan="2">游戏分成比例</th>
<th>结算周期</th>
<th>户名</th>
<th>银行账号</th>
<th>收款银</th>
<th>户名</th>
<th>账号</th>
<th>开户</th>
<th>是否有预付款</th>
<th>是否为收款方</th>
@ -105,6 +106,7 @@
<notempty name="data.game">
<td rowspan="{$data['game'][0]['row']}">{$data['game'][0]['original_package_name']|default="--"}</td>
<td rowspan="{$data['game'][0]['row']}">{$data['game'][0]['relation_game_name']|default="--"}</td>
<td rowspan="{$data['game'][0]['row']}">{$data['game'][0]['aggregate_gamename']|default="--"}</td>
<td rowspan="{$data['game'][0]['row']}">{$data['game'][0]['game_type_name']|default="--"}</td>
<notempty name="data['game'][0]['game_ratio']">
<td>{$data['game'][0]['game_ratio'][0]['name']|default="--"}</td>
@ -171,6 +173,7 @@
<tr>
<td rowspan="{$game['row']}">{$game['original_package_name']|default="--"}</td>
<td rowspan="{$game['row']}">{$game['relation_game_name']|default="--"}</td>
<td rowspan="{$game['row']}">{$game['aggregate_gamename']|default="--"}</td>
<td rowspan="{$game['row']}">{$game['game_type_name']|default="--"}</td>
<notempty name="game['game_ratio']">
<td>{$game['game_ratio'][0]['name']|default="--"}</td>

@ -135,9 +135,9 @@
<th>开票税点</th>
<th>税费费率</th>
<th>户名</th>
<th>银行账号</th>
<th>收款银</th>
<th>户名</th>
<th>账号</th>
<th>开户</th>
<th>创建记录</th>
<th>审核记录</th>

@ -106,9 +106,9 @@
<th>合同期限</th>
<th>结算周期</th>
<th>户名</th>
<th>银行账号</th>
<th>收款银</th>
<th>户名</th>
<th>账号</th>
<th>开户</th>
<th>是否有预付款</th>
<th>是否为收款方</th>

@ -48,16 +48,18 @@
<th>原包名</th>
<th>现包名</th>
<th>聚合包名</th>
<th>产品类型</th>
<th colspan="2">推广分成比例</th>
<th colspan="2">CP分成比例</th>
<th>户名</th>
<th>银行账号</th>
<th>账号</th>
<th>开户行</th>
<th>是否收款方</th>
<th>支付宝真实姓名</th>
<th>支付宝账号</th>
<th>是否支付宝付款</th>
<!-- <th>支付宝真实姓名</th>-->
<!-- <th>支付宝账号</th>-->
<th>是否签署合同</th>
<th>合同期限</th>
@ -104,6 +106,8 @@
{$data['list'][0]['list'][0]['original_package_name']|default="--"}</td>
<td rowspan="{$data['list'][0]['list'][0]['row']}">
{$data['list'][0]['list'][0]['relation_game_name']|default="--"}</td>
<td rowspan="{$data['list'][0]['list'][0]['row']}">
{$data['list'][0]['list'][0]['aggregate_gamename']|default="--"}</td>
<td rowspan="{$data['list'][0]['list'][0]['row']}">
{$data['list'][0]['list'][0]['game_type_name']|default="--"}</td>
@ -127,6 +131,7 @@
<td>--</td>
<td>--</td>
<td>--</td>
<td>--</td>
</notempty>
<else />
<td>--</td>
@ -145,8 +150,9 @@
<td rowspan="{$data.row}">&nbsp;{$data.bank_card|default="--"}</td>
<td rowspan="{$data.row}">{$data.bank_name|default="--"}</td>
<td rowspan="{$data.row}">{$data.collection|default="--"}</td>
<td rowspan="{$data.row}">{$data.ali_user|default="--"}</td>
<td rowspan="{$data.row}">{$data.ali_account|default="--"}</td>
<td rowspan="{$data.row}">{$data.is_payment|default="--"}</td>
<!-- <td rowspan="{$data.row}">{$data.ali_user|default="&#45;&#45;"}</td>-->
<!-- <td rowspan="{$data.row}">{$data.ali_account|default="&#45;&#45;"}</td>-->
<td rowspan="{$data.row}">{$data.is_sign_contact|default="--"}</td>
<td rowspan="{$data.row}">{$data.contract_time}</td>
@ -190,6 +196,7 @@
<tr>
<td rowspan="{$p_ratio['row']}">{$p_ratio['original_package_name']|default="--"}</td>
<td rowspan="{$p_ratio['row']}">{$p_ratio['relation_game_name']|default="--"}</td>
<td rowspan="{$p_ratio['row']}">{$p_ratio['aggregate_gamename']|default="--"}</td>
<td rowspan="{$p_ratio['row']}">{$p_ratio['game_type_name']|default="--"}</td>
<notempty name="p_ratio['turnover_ratio']">
@ -237,6 +244,7 @@
<notempty name="promote['list']">
<td rowspan="{$promote['list'][0]['row']}">{$promote['list'][0]['original_package_name']|default="--"}</td>
<td rowspan="{$promote['list'][0]['row']}">{$promote['list'][0]['relation_game_name']|default="--"}</td>
<td rowspan="{$promote['list'][0]['row']}">{$promote['list'][0]['aggregate_gamename']|default="--"}</td>
<td rowspan="{$promote['list'][0]['row']}">{$promote['list'][0]['game_type_name']|default="--"}</td>
<notempty name="promote['list'][0]['turnover_ratio']">
@ -283,6 +291,7 @@
<tr>
<td rowspan="{$game['row']}">{$game['original_package_name']|default="--"}</td>
<td rowspan="{$game['row']}">{$game['relation_game_name']|default="--"}</td>
<td rowspan="{$game['row']}">{$game['aggregate_gamename']|default="--"}</td>
<td rowspan="{$game['row']}">{$game['game_type_name']|default="--"}</td>
<notempty name="game['turnover_ratio']">

@ -13,6 +13,7 @@ class AggregateClient
private $apis = [
'game-data' => '/index.php?g=api&m=Game&a=rechargeData',
'aggregate-gamename' => '/index.php?g=api&m=Game&a=getAggregatePacket'
];
public function __construct()

Loading…
Cancel
Save