Merge branch 'master' of 8.136.139.249:wmtx/platform into feature/more_payment

master
chenzhi 4 years ago
commit ff7f2d7469

@ -586,7 +586,7 @@ class CompanyStatementOfflineController extends ThinkController
,'pay_time'=>strtotime($payment_time)
];
$unPayData = SM("company_statement_info_part","tab_")
$unPayData = M("company_statement_info_part","tab_")
->field("sum(statement_money) statement_money,info_id")
->where(["pay_status"=>0])
->group("info_id")
@ -597,7 +597,7 @@ class CompanyStatementOfflineController extends ThinkController
$handleData[$value['info_id']] = $value['statement_money'];
}
$payData = SM("company_statement_info_part","tab_")
$payData = M("company_statement_info_part","tab_")
->field("sum(statement_money) statement_money,info_id")
->group("info_id")
->select();
@ -613,11 +613,16 @@ class CompanyStatementOfflineController extends ThinkController
$time = date("Y-m-d H:i:s",time());
$unPayAmount = $value['statement_money']-$handlePayData[$value['id']];
$saveData['remark'] = $value['remark'];
$partInfo = M("company_statement_info_part","tab_")->where(['info_id'=>$value['id']])->order("id desc")->find();
$partCompanyInfo = json_decode($partInfo['company_info'],true);
$saveData['company_info'] = $partInfo['company_info'];
if($handleData[$value['id']]) {
$saveData['remark'] = "{$value['remark']} {$_SESSION['onethink_admin']['user_auth']['username']}于{$time}已打款{$handleData[$value['id']]},剩余{$unPayAmount}";
$saveData['remark'] .= ";{$_SESSION['onethink_admin']['user_auth']['username']}于{$time}向({$partCompanyInfo['payee_name']}/{$partCompanyInfo['opening_bank']}/{$partCompanyInfo['bank_account']})打款{$handleData[$value['id']]},剩余{$unPayAmount}";
}
SM("company_statement_info_part","tab_")
M("company_statement_info_part","tab_")
->where(['info_id'=>$value['id'],'pay_status'=>['neq',1]])
->save(["pay_status"=>1,'pay_time'=>strtotime($payment_time)]);
@ -629,7 +634,8 @@ class CompanyStatementOfflineController extends ThinkController
"pay_status"=>1,
"pay_info"=>json_encode(["payment_user"=>$_SESSION['onethink_admin']['user_auth']["username"],"payment_time"=>$payment_time]),
"remark"=>$saveData['remark'],
'pay_time'=>strtotime($payment_time)
'pay_time'=>strtotime($payment_time),
'company_info'=>$partInfo['company_info']
]);
} else {
$companyStatementInfo->where(['id'=>$value['id']])->save($saveData);

@ -779,6 +779,9 @@ class CompanyStatementPoolController extends ThinkController
$cline = $line+1;
if($is_export){
$v['statement_money'] = "=ROUND(";
$v['remark'] = str_replace(";","\n",$v['remark']);
}else{
$v['remark'] = str_replace(";","<br>",$v['remark']);
}
$handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line);
$v['statement_info'] = $handle_data;

@ -17,11 +17,12 @@ class GameMarginSetController extends Controller {
private $year;//年份
private $adddata;//要添加的数据
private $inSideCompanyIds;
// public $result='';
private $debugGame=false;
private $debugStr='';
/**
* 更新某月数据
*/
public function setFreeMonth($count_date)
public function setFreeMonth($count_date,$debug_game=false)
{
//设置转换精度
ini_set('serialize_precision',14);
@ -37,6 +38,7 @@ class GameMarginSetController extends Controller {
$this->month= $tarry[1];
$this->beginThismonth=mktime(0,0,0,$tarry[1],1,$tarry[0]);
$this->endThismonth=mktime(0,0,0,$tarry[1]-0+1,1,$tarry[0])-1;
$this->debugGame=$debug_game;
$this->reCount();
$this->setGameMargin();
@ -66,6 +68,10 @@ class GameMarginSetController extends Controller {
$this->getPuStatement();
$this->getPcStatement();
$this->setMarginCount();
if($this->debugGame){
$str = $this->debugGame . PHP_EOL."公司名称,团体归属,时间,流水,分成". $this->debugStr . PHP_EOL;
echo $str;
}
echo "{$this->year}-{$this->month}生成成功".PHP_EOL;
}
/**
@ -223,6 +229,9 @@ class GameMarginSetController extends Controller {
$this->adddata[$val['game_name']]['pu_pay_amount'] = $val['pay_amount'];
$this->adddata[$val['game_name']]['pu_statement_amount'] = $val['sum_money'];
}
if($this->debugGame && $this->debugGame == $val['game_name']){
$this->debugStr .= (PHP_EOL."{$v['company_name']},外团,{$time['begin_time']}-{$time['end_time']},{$val['pay_amount']},{$val['sum_money']}");
}
}
}
}
@ -293,6 +302,10 @@ class GameMarginSetController extends Controller {
$this->adddata[$val['game_name']]['pu_pay_amount'] = $val['pay_amount'];
$this->adddata[$val['game_name']]['pu_statement_amount'] = $val['sum_money'];
}
if($this->debugGame && $this->debugGame == $val['game_name']){
$this->debugStr .= (PHP_EOL."{$v['company_name']},外团,{$time['begin_time']}-{$time['end_time']},{$val['pay_amount']},{$val['sum_money']}");
}
}
}
}
@ -322,6 +335,13 @@ class GameMarginSetController extends Controller {
}else{
$this->adddata[$val['game_name']]['pu_statement_amount'] = $val['sum_money'];
}
if($this->debugGame && $this->debugGame == $val['game_name']){
$beginThismonth = date("Y.m.d",$this->beginThismonth);
$endThismonth = date("Y.m.d",$this->endThismonth);
$this->debugStr .= (PHP_EOL."{$v['company_name']},外团,{$beginThismonth}-{$endThismonth},0,{$val['sum_money']}");
}
}
}
}

@ -26,7 +26,8 @@ class PartnerController extends ThinkController
public function lists()
{
$model = M($this->modelName, 'tab_');
$map = [];
$now = time();
$map = ["_string" => "1=1 "];
$id = intval(I('id', 0));
if (!empty($id)) {
$map['tab_partner.id'] = $id;
@ -56,6 +57,14 @@ class PartnerController extends ThinkController
$time_end = strtotime($_REQUEST['timeend'])+ 86399;
$map["_string"] = "(contract_start_time <= {$time_end} ) OR (contract_end_time <= {$time_end})";
}
if (!empty(I('contract_type'))) {
if(I('contract_type') == 1){
$map['_string'] .= " AND (contract_end_time = 0 OR contract_end_time > {$now})";
}else{
$map['_string'] .= " AND (contract_end_time <= {$now} AND contract_end_time != 0)";
}
}
if($_REQUEST['original_package_name']) {
$game_map['original_package_name'] = ['like',"%{$_REQUEST['original_package_name']}%"];
@ -241,6 +250,14 @@ class PartnerController extends ThinkController
$contract_end_time = $value['contract_end_time'] ? time_format($value['contract_end_time'], 'Y/m/d') : '-';
}
$value['contract_time'] = $contract_start_time . '-' . $contract_end_time;
//判断合同是否过期
if($value['contract_end_time'] == 0){
$value['contract_str'] = "未过期";
}elseif($value['contract_end_time']-0+86399 < time()){
$value['contract_str'] = "<span style='color:red;'>已过期</span>";
}else{
$value['contract_str'] = "未过期";
}
$validity_start_time = $value['validity_start_time'] ? time_format($value['validity_start_time'], 'Y/m/d') : '-';
if($value['validity_start_time']){
@ -265,7 +282,7 @@ class PartnerController extends ThinkController
}
}
// dd($parseData);
if($is_export){
$this->assign('listData', $parseData);
$GetData = $_GET;

@ -207,7 +207,7 @@
</if>
<td rowspan="{$com.row}"><if condition="$com['is_payment'] eq 1"><else /></if></td>
<if condition="!$is_special_export"><td rowspan="{$com.row}"><if condition="$com['st'] eq 0"><else /></if></td></if>
<if condition="!$is_special_export"><td rowspan="{$com.row}">{$com.remark}</td></if>
<if condition="!$is_special_export"><td rowspan="{$com.row}" style="text-align: left;max-width: 370px;">{$com.remark}</td></if>
<if condition="!$is_export">
<td rowspan="{$com.row}">

@ -72,6 +72,7 @@
<th>是否有游戏资质</th>
<th>是否签署合同</th>
<th>合同期限</th>
<th>合同是否过期</th>
<th>生效期限</th>
<th>公司税号</th>
<th>开票税点</th>
@ -136,6 +137,7 @@
<td rowspan="{$data.row}">{$data.is_sign_contract|default="--"}</td>
<td rowspan="{$data.row}">{$data.contract_time}</td>
<td rowspan="{$data.row}">{$data.contract_str}</td>
<td rowspan="{$data.row}">{$data.validity_time}</td>
<td rowspan="{$data.row}">{$data.company_tax_no|default="--"}</td>
<td rowspan="{$data.row}">{$data.invoice_rate|showPercent}</td>

@ -84,6 +84,13 @@
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="contract_type" name="contract_type" class="select_gallery" >
<option value="">合同是否过期</option>
<option value="1">未过期</option>
<option value="2">已过期</option>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('lists','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
@ -114,6 +121,7 @@
<th colspan="2">游戏分成比例</th>
<th>合同期限</th>
<th>合同是否过期</th>
<th>结算周期</th>
<th>户名</th>
<th>账号</th>
@ -156,6 +164,7 @@
</notempty>
<td rowspan="{$data.row}">{$data.contract_time}</td>
<td rowspan="{$data.row}">{$data.contract_str}</td>
<td rowspan="{$data.row}">{$data.settlement_type|default="--"}</td>
<td rowspan="{$data.row}">{$data.payee_name|default="--"}</td>
<td rowspan="{$data.row}">{$data.bank_account|default="--"}</td>

@ -338,12 +338,12 @@ class TestingResourceService
throw new \Exception('该玩家账号为测试账号,无法绑定');
}
/* $existBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => $gameId, 'bind_role_id' => $bindRoleId])->find();
if ($existBind) {
throw new \Exception('该玩家角色已被绑定');
} */
$existBindCount = M('testing_binding', 'tab_')->where(['game_id' => ['in', $gameIds], 'bind_role_id' => $bindRoleId])->count();
if ($existBindCount >= 2) {
throw new \Exception('同一角色最多只能被绑定两次');
}
$testExistBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => $gameId, 'role_id' => $testingRoleId])->find();
$testExistBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => ['in', $gameIds], 'role_id' => $testingRoleId])->find();
if ($testExistBind) {
throw new \Exception('该测试账号角色已绑定有角色');
}

@ -30,6 +30,8 @@ class GameResource
248 => LeyouClient::class, // 剑破长空(苹果版)
275 => LeyouClient::class, // 一梦仙境(安卓版)
276 => LeyouClient::class, // 一梦仙境(苹果版)
280 => LeyouClient::class, // 万剑八荒(安卓版)
281 => LeyouClient::class, // 万剑八荒(苹果版)
];
public function __construct($game)

Loading…
Cancel
Save