|
|
|
@ -140,50 +140,50 @@ class PaymentController extends BaseController
|
|
|
|
|
$v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($handleData) {
|
|
|
|
|
$statementInfo = M("pay_statement_info","tab_")
|
|
|
|
|
->alias('s')
|
|
|
|
|
->field("s.*,p.statement_num statement_pool_num")
|
|
|
|
|
->join("left join tab_company_statement_info i ON s.statement_info_id = i.id")
|
|
|
|
|
->join("left join tab_company_statement_pool p ON p.id = i.pool_id")
|
|
|
|
|
->where(['statement_info_id'=>['in',$handleData]])
|
|
|
|
|
->order("FIELD(s.pay_status,0,-1,1),s.verify_status desc")
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
$statementInfo = M("pay_statement_info","tab_")
|
|
|
|
|
->alias('s')
|
|
|
|
|
->field("s.*,p.statement_num statement_pool_num")
|
|
|
|
|
->join("left join tab_company_statement_info i ON s.statement_info_id = i.id")
|
|
|
|
|
->join("left join tab_company_statement_pool p ON p.id = i.pool_id")
|
|
|
|
|
->where(['statement_info_id'=>['in',$handleData]])
|
|
|
|
|
->order("FIELD(s.pay_status,0,-1,1),s.verify_status desc")
|
|
|
|
|
->select();
|
|
|
|
|
$handleData = [];
|
|
|
|
|
foreach ($statementInfo as $key => $value) {
|
|
|
|
|
|
|
|
|
|
$handleData = [];
|
|
|
|
|
foreach ($statementInfo as $key => $value) {
|
|
|
|
|
$value['can_pay'] = 1;
|
|
|
|
|
if($value['verify_status'] == -1){
|
|
|
|
|
$value['verify_status_str']="信息配置不全";
|
|
|
|
|
$value['can_pay'] = 0;
|
|
|
|
|
}else{
|
|
|
|
|
if($value['pay_status'] == 1){ $value['can_pay'] = 0; }
|
|
|
|
|
$value['verify_status_str'] = $this->PayStatus[$value['pay_status']];
|
|
|
|
|
if($value['pay_status'] == 1){
|
|
|
|
|
$value['pay_type'] = $value['pay_type'] == 1 ? "提现" :"线上打款";
|
|
|
|
|
$value['verify_status_str'] .= ("/". $value['pay_type']);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$value['can_pay'] = 1;
|
|
|
|
|
if($value['verify_status'] == -1){
|
|
|
|
|
$value['verify_status_str']="信息配置不全";
|
|
|
|
|
$value['can_pay'] = 0;
|
|
|
|
|
}else{
|
|
|
|
|
if($value['pay_status'] == 1){ $value['can_pay'] = 0; }
|
|
|
|
|
$value['verify_status_str'] = $this->PayStatus[$value['pay_status']];
|
|
|
|
|
if($value['pay_status'] == 1){
|
|
|
|
|
$value['pay_type'] = $value['pay_type'] == 1 ? "提现" :"线上打款";
|
|
|
|
|
$value['verify_status_str'] .= ("/". $value['pay_type']);
|
|
|
|
|
$value['company_type'] = $this->CompanyType[$value['company_type']];
|
|
|
|
|
$value['statement_begin_time'] = date('Y-m-d',$value['statement_begin_time']);
|
|
|
|
|
$value['statement_end_time'] = date('Y-m-d',$value['statement_end_time']);
|
|
|
|
|
if(empty($value['pay_time'])){
|
|
|
|
|
$value['pay_time'] = "--";
|
|
|
|
|
}else{
|
|
|
|
|
$value['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']);
|
|
|
|
|
}
|
|
|
|
|
$value["valid"] = "{$value['statement_begin_time']} ~ {$value['statement_end_time']}";
|
|
|
|
|
$handleData[$value['statement_info_id']]['data'][] = $value;
|
|
|
|
|
$handleData[$value['statement_info_id']]['ids'][] = $value['id'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$value['company_type'] = $this->CompanyType[$value['company_type']];
|
|
|
|
|
$value['statement_begin_time'] = date('Y-m-d',$value['statement_begin_time']);
|
|
|
|
|
$value['statement_end_time'] = date('Y-m-d',$value['statement_end_time']);
|
|
|
|
|
if(empty($value['pay_time'])){
|
|
|
|
|
$value['pay_time'] = "--";
|
|
|
|
|
}else{
|
|
|
|
|
$value['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']);
|
|
|
|
|
foreach ($CompanyInfo as $key=>$value) {
|
|
|
|
|
$CompanyInfo[$key]['son_info'] = $handleData[$value['id']]['data'];
|
|
|
|
|
$CompanyInfo[$key]['ids'] = implode(',',$handleData[$value['id']]['ids']);
|
|
|
|
|
}
|
|
|
|
|
$value["valid"] = "{$value['statement_begin_time']} ~ {$value['statement_end_time']}";
|
|
|
|
|
$handleData[$value['statement_info_id']]['data'][] = $value;
|
|
|
|
|
$handleData[$value['statement_info_id']]['ids'][] = $value['id'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach ($CompanyInfo as $key=>$value) {
|
|
|
|
|
$CompanyInfo[$key]['son_info'] = $handleData[$value['id']]['data'];
|
|
|
|
|
$CompanyInfo[$key]['ids'] = implode(',',$handleData[$value['id']]['ids']);
|
|
|
|
|
}
|
|
|
|
|
// dump($CompanyInfo);die();
|
|
|
|
|
|
|
|
|
|
//统计待打款金额
|
|
|
|
|
$countmap = $map;
|
|
|
|
|