|
|
|
@ -1198,9 +1198,10 @@ class ExportController extends Controller
|
|
|
|
|
// $map = '1 = 2';
|
|
|
|
|
// $map1 = $map;
|
|
|
|
|
// }
|
|
|
|
|
D("Spend")->addSubsiteWhere($map);
|
|
|
|
|
$map1 = $map;
|
|
|
|
|
$map1['pay_status'] = 1;
|
|
|
|
|
$total = SM('Spend','tab_')->where($map1)->sum('pay_amount');
|
|
|
|
|
$total = M('Spend','tab_')->where($map1)->sum('pay_amount');
|
|
|
|
|
// var_dump($total);die();
|
|
|
|
|
$total=$total?$total:0;
|
|
|
|
|
|
|
|
|
@ -1276,7 +1277,7 @@ class ExportController extends Controller
|
|
|
|
|
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
|
|
|
|
|
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
|
|
|
|
|
|
|
|
|
|
$accessNum = SM('Spend')
|
|
|
|
|
$accessNum = M('Spend',"tab_")
|
|
|
|
|
->where($map)
|
|
|
|
|
->count();
|
|
|
|
|
|
|
|
|
@ -1285,7 +1286,7 @@ class ExportController extends Controller
|
|
|
|
|
|
|
|
|
|
// var_dump($count);die();
|
|
|
|
|
for($i = 1; $i <= $pages; $i++) {
|
|
|
|
|
$xlsData = SM('Spend')
|
|
|
|
|
$xlsData = M('Spend',"tab_")
|
|
|
|
|
->field($fields)
|
|
|
|
|
->where($map)
|
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)
|
|
|
|
|