|
|
@ -72,7 +72,7 @@ class ExcelPaymentController extends BaseController
|
|
|
|
$map['i.pay_status'] = $_REQUEST['pay_status'];
|
|
|
|
$map['i.pay_status'] = $_REQUEST['pay_status'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(isset($_REQUEST['batch_num'])){
|
|
|
|
if(isset($_REQUEST['batch_num'])){
|
|
|
|
$map['i.batch_num'] = $_REQUEST['batch_num'];
|
|
|
|
$map['i.batch_num'] = ["LIKE","%{$_REQUEST['batch_num']}%"];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$CompanyInfo = M("excel_statement_info","tab_")
|
|
|
|
$CompanyInfo = M("excel_statement_info","tab_")
|
|
|
@ -101,14 +101,17 @@ class ExcelPaymentController extends BaseController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//统计待打款金额
|
|
|
|
//统计待打款金额
|
|
|
|
$countmap = $map;
|
|
|
|
$field = "IFNULL(SUM(CASE WHEN pay_status = 1 THEN statement_money ELSE 0 END),0) as success_money,
|
|
|
|
$countmap['pay_status']=["neq",1];
|
|
|
|
IFNULL(SUM(CASE WHEN pay_status = 0 THEN statement_money ELSE 0 END),0) as statement_money,
|
|
|
|
$money = M("excel_statement_info","tab_")->alias('i')->field("sum(statement_money) statement_money")->where($countmap)->find();
|
|
|
|
IFNULL(SUM(CASE WHEN pay_status = -1 THEN statement_money ELSE 0 END),0) as error_money";
|
|
|
|
|
|
|
|
$money = M("excel_statement_info","tab_")->alias('i')->field( $field)->where($map)->find();
|
|
|
|
|
|
|
|
|
|
|
|
$count = M("excel_statement_info","tab_")->alias('i')->field("count(id) count")->where($map)->find();
|
|
|
|
$count = M("excel_statement_info","tab_")->alias('i')->field("count(id) count")->where($map)->find();
|
|
|
|
$page = set_pagination($count['count'], $row);
|
|
|
|
$page = set_pagination_all($count['count'], $row);
|
|
|
|
if ($page) {
|
|
|
|
if ($page) {
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// echo($page);die();
|
|
|
|
$this->meta_title = 'EXCEL打款';
|
|
|
|
$this->meta_title = 'EXCEL打款';
|
|
|
|
$this->assign("data",$CompanyInfo);
|
|
|
|
$this->assign("data",$CompanyInfo);
|
|
|
|
$this->assign("money",$money);
|
|
|
|
$this->assign("money",$money);
|
|
|
|