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