Merge branch 'feature/company_export_change' of wmtx/platform into release

上下游聚合打款信息修改
master
郑永星 4 years ago committed by Gogs
commit a22801c529

@ -2,6 +2,7 @@
namespace Admin\Controller;
use Base\Tool\AggregateClient;
use User\Api\UserApi as UserApi;
use Think\Controller;
use Base\Service\PartnerService;
@ -14,6 +15,8 @@ class PartnerController extends ThinkController
{
private $modelName = 'Partner';
public $OpAuthList=[];
public $aggregatePackageName = [];
public function _initialize()
{
$this->admininfo = $_SESSION['onethink_admin']['user_auth'];
@ -62,6 +65,7 @@ class PartnerController extends ThinkController
$is_export= false;
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
$is_export = true;
$this->getAggregatePackage();
}
//获取分页数据
@ -86,7 +90,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();
@ -142,6 +146,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;
}
@ -657,5 +663,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;
@ -18,6 +19,8 @@ class PromoteCompanyController extends ThinkController
{
private $modelName = 'PromoteCompany';
public $ratio = [];
public $aggregatePackageName = [];
public function _initialize()
{
$this->admininfo = $_SESSION['onethink_admin']['user_auth'];
@ -30,6 +33,7 @@ class PromoteCompanyController extends ThinkController
$is_export= false;
if (isset($_REQUEST['export']) && $_REQUEST['export']==1){
$is_export = true;
$this->getAggregatePackage();
}
$map = [];
$promotemap=[];
@ -42,6 +46,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}%");
@ -117,12 +122,24 @@ class PromoteCompanyController extends ThinkController
foreach($companyres as $k=>&$v){
$deposit = $depositList[$v['id']] ?? null;
$tmpr = D("CompanyRelation")->getCompanyRelation(2,$v['id']);
$v["settlement_type"] = $tmpr['settlement_type'];
$v["deposit_pay_type"] = $deposit ? $payTypes[$deposit['pay_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"]);
$v['company_type'] = $v['company_type'] == 2 ? '个人' : '公司';
@ -169,7 +186,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);
@ -200,7 +217,7 @@ class PromoteCompanyController extends ThinkController
$this->meta_title = '下游推广公司';
$this->display();
}
public function index()
{
$page = intval(I('get.p', 0));
@ -393,7 +410,7 @@ class PromoteCompanyController extends ThinkController
$save = I('post.');//前端已经验证
$save['promotes'] = json_decode($save['promotes'], true);
$this->checkData($save);
$presidentDepositService = new PresidentDepositService();
@ -407,7 +424,7 @@ class PromoteCompanyController extends ThinkController
$promoteCompanyService->checkCompanyRelation($save['relation'] ?? []);
} catch (\Exception $e) {
$this->ajaxReturn(array(
'status' => 0,
'status' => 0,
'info' => $e->getMessage()
));
}
@ -506,7 +523,7 @@ class PromoteCompanyController extends ThinkController
$relation['self_company_id'] = $relation['first_company_id'];
}
}
$deposit = M('president_deposit', 'tab_')->where(['company_id' => $data['id']])->find();
$this->assign('selfCompanies', $selfCompanies);
@ -612,11 +629,11 @@ class PromoteCompanyController extends ThinkController
$promoteCompanyService->checkCompanyRelation($save['relation'] ?? []);
} catch (\Exception $e) {
$this->ajaxReturn(array(
'status' => 0,
'status' => 0,
'info' => $e->getMessage()
));
}
$save['turnover_ratio'] = $this->setTurnoverRatio($save);
$res = D("PromoteCompanyVerify")->edit_db($save);
if ($res) {
@ -685,7 +702,7 @@ class PromoteCompanyController extends ThinkController
$relationWhere = '(first_company_type=2 and first_company_id=' . $data['id'] .
') or (second_company_type=2 and second_company_id=' . $data['id'] . ')';
$relation = M('company_relation', 'tab_')->where($relationWhere)->find();
if ($relation) {
if ($relation['first_company_type'] == 2 && $relation['first_company_id'] == $data['id']) {
$relation['collaborate_way'] = 1;
@ -1101,7 +1118,7 @@ class PromoteCompanyController extends ThinkController
$this->error('已添加过此推广公司,请联系管理尽快审核');
}
}
// if(!empty(I("contact_phone")) && !checkPhone(I('contact_phone'))) {
// $this->error('联系电话格式不正确');
@ -1460,10 +1477,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;
@ -1476,6 +1495,19 @@ class PromoteCompanyController extends ThinkController
}else{
return true;
}
}
}
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>
@ -104,6 +105,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>
@ -169,6 +171,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']">

@ -14,6 +14,7 @@ class AggregateClient
private $apis = [
'game-data' => '/index.php?g=api&m=Game&a=rechargeData',
'game-recharge-detail' => '/index.php?g=api&m=Game&a=rechargeDetail',
'aggregate-gamename' => '/index.php?g=api&m=Game&a=getAggregatePacket'
];
public function __construct()
@ -48,7 +49,6 @@ class AggregateClient
'form_params' => $params,
]);
$result = (string)$response->getBody();
// var_dump($result);
return json_decode($result, true);
}
}
Loading…
Cancel
Save