|
|
|
@ -89,14 +89,15 @@ class ExcelPaymentController extends BaseController
|
|
|
|
|
|
|
|
|
|
$v['company_type'] = $this->CompanyType[$v['company_type']];
|
|
|
|
|
$v["pay_status_str"] = $this->PayStatus[$v['pay_status']];
|
|
|
|
|
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
|
|
|
|
|
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
|
|
|
|
|
$v['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
|
|
|
|
|
// $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
|
|
|
|
|
// $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
|
|
|
|
|
if(empty($v['pay_time'])){
|
|
|
|
|
$v['pay_time'] = "--";
|
|
|
|
|
}else{
|
|
|
|
|
$v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']);
|
|
|
|
|
}
|
|
|
|
|
$v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}";
|
|
|
|
|
// $v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//统计待打款金额
|
|
|
|
@ -126,8 +127,8 @@ class ExcelPaymentController extends BaseController
|
|
|
|
|
public function loopAdd()
|
|
|
|
|
{
|
|
|
|
|
$p = $_REQUEST;
|
|
|
|
|
$statement_begin_time = strtotime($p['statement_begin_time']);
|
|
|
|
|
$statement_end_time = strtotime($p['statement_end_time'])+86399;
|
|
|
|
|
// $statement_begin_time = strtotime($p['statement_begin_time']);
|
|
|
|
|
// $statement_end_time = strtotime($p['statement_end_time'])+86399;
|
|
|
|
|
$batch = $p['batch'];
|
|
|
|
|
$checkarr = $p['checkarr'];
|
|
|
|
|
//循环获取添加
|
|
|
|
@ -137,8 +138,8 @@ class ExcelPaymentController extends BaseController
|
|
|
|
|
$ExcelStatementInfo = M('ExcelStatementInfo',"tab_");
|
|
|
|
|
foreach ($checkarr as $k => &$v) {
|
|
|
|
|
$company_info = $v['company_info'];
|
|
|
|
|
$v['statement_begin_time'] = $statement_begin_time;
|
|
|
|
|
$v['statement_end_time'] = $statement_end_time;
|
|
|
|
|
// $v['statement_begin_time'] = $statement_begin_time;
|
|
|
|
|
// $v['statement_end_time'] = $statement_end_time;
|
|
|
|
|
$v['batch_num'] = $batch;
|
|
|
|
|
$v['statement_info'] = json_encode($v['statement_info'],JSON_UNESCAPED_UNICODE);
|
|
|
|
|
$v['company_info'] = json_encode($v['company_info'],JSON_UNESCAPED_UNICODE);
|
|
|
|
@ -214,12 +215,32 @@ class ExcelPaymentController extends BaseController
|
|
|
|
|
foreach($infolist as $k=>&$v){
|
|
|
|
|
$v['statement_info'] = json_decode($v['statement_info'],true);
|
|
|
|
|
$v['company_info'] = json_decode($v['company_info'],true);
|
|
|
|
|
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
|
|
|
|
|
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
|
|
|
|
|
// $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
|
|
|
|
|
// $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
|
|
|
|
|
|
|
|
|
|
$cline = $line+1;
|
|
|
|
|
if($is_export){
|
|
|
|
|
$v['sum_money_exp'] = "=";
|
|
|
|
|
$hh = "\n";
|
|
|
|
|
}else{
|
|
|
|
|
$hh = "<br>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$dm = json_decode($v['document_maker'],true);
|
|
|
|
|
$v['document_maker'] = $dm['mobile'].$hh."({$dm['real_name']})";
|
|
|
|
|
if(!empty($v['payment_user'])){
|
|
|
|
|
$pu = json_decode($v['payment_user'],true);
|
|
|
|
|
$v['payment_user'] = $pu['mobile'].$hh."({$pu['real_name']})";
|
|
|
|
|
}else{
|
|
|
|
|
$v['payment_user'] = "--";
|
|
|
|
|
}
|
|
|
|
|
$v["pay_status_str"] = $this->PayStatus[$v['pay_status']];
|
|
|
|
|
if(!empty($v['pay_time'])){
|
|
|
|
|
$v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']);
|
|
|
|
|
}else{
|
|
|
|
|
$v['pay_time'] = '--';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$row = 0;
|
|
|
|
|
foreach($v['statement_info'] as $ke=>&$va){
|
|
|
|
|
$va['row'] = count($va['game_list']);
|
|
|
|
@ -322,7 +343,7 @@ class ExcelPaymentController extends BaseController
|
|
|
|
|
$amount = 0.1; //测试金额必须去除
|
|
|
|
|
$payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title);
|
|
|
|
|
$resultCode = $payres->code;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$savedata = ["id"=>$dbres['id']];
|
|
|
|
|
if(!empty($resultCode)&&$resultCode == 10000){
|
|
|
|
|
$savedata["pay_status"]=1;
|
|
|
|
|