|
|
@ -2401,6 +2401,9 @@ public function iosDetailExcelInfo($id,$map) {
|
|
|
|
$accessNum = count($rs)?:0 ;
|
|
|
|
$accessNum = count($rs)?:0 ;
|
|
|
|
$perSize = 5000;//每次查询的条数
|
|
|
|
$perSize = 5000;//每次查询的条数
|
|
|
|
$pages = ceil($accessNum / $perSize);
|
|
|
|
$pages = ceil($accessNum / $perSize);
|
|
|
|
|
|
|
|
if ($pages == 0) {
|
|
|
|
|
|
|
|
$pages = 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
for($i = 1; $i <= $pages; $i++) {
|
|
|
|
for($i = 1; $i <= $pages; $i++) {
|
|
|
|
$data = M('promote', 'tab_')->field(['id'])->where($map1)
|
|
|
|
$data = M('promote', 'tab_')->field(['id'])->where($map1)
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)->select();
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)->select();
|
|
|
@ -2429,13 +2432,14 @@ public function iosDetailExcelInfo($id,$map) {
|
|
|
|
$tfCounts = M('package_download_log', 'tab_')->where($tfMap)->count(); //TF下载量
|
|
|
|
$tfCounts = M('package_download_log', 'tab_')->where($tfMap)->count(); //TF下载量
|
|
|
|
$companyCounts = M('package_download_log', 'tab_')->where($companyMap)->count(); //企业签下载量
|
|
|
|
$companyCounts = M('package_download_log', 'tab_')->where($companyMap)->count(); //企业签下载量
|
|
|
|
$superCounts = M('package_download_log', 'tab_')->where($superMap)->count(); //超级签下载量
|
|
|
|
$superCounts = M('package_download_log', 'tab_')->where($superMap)->count(); //超级签下载量
|
|
|
|
$usersCounts = M('user', 'tab_')->where(['promote_id' => $id])->count();
|
|
|
|
$usersCounts = M('user', 'tab_')->where(['promote_id' => $id, 'device_type'=>2])->count();
|
|
|
|
$tfpercent = 1;
|
|
|
|
$tfpercent = number_format((intval($tfCounts) / intval($usersCounts)),2,'.','') * 100;
|
|
|
|
if ($iosCount == 0) {
|
|
|
|
|
|
|
|
|
|
|
|
if (intval($usersCounts) == 0) {
|
|
|
|
$tfpercent = 0;
|
|
|
|
$tfpercent = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$csvData['userscounts'] = intval($usersCounts);
|
|
|
|
$csvData['userscounts'] = intval($usersCounts);
|
|
|
|
$csvData['ioscount'] = $iosCount;
|
|
|
|
$csvData['ioscount'] = $iosCount;
|
|
|
|
$csvData['tfcounts'] = intval($tfCounts).'('.$tfpercent.'%)';
|
|
|
|
$csvData['tfcounts'] = intval($tfCounts).'('.$tfpercent.'%)';
|
|
|
|
$csvData['supercounts'] = intval($superCounts);
|
|
|
|
$csvData['supercounts'] = intval($superCounts);
|
|
|
|
$csvData['companycounts'] = intval($companyCounts);
|
|
|
|
$csvData['companycounts'] = intval($companyCounts);
|
|
|
@ -2480,7 +2484,7 @@ public function iosDetailExcelInfo($id,$map) {
|
|
|
|
$allData['account'] = '汇总';
|
|
|
|
$allData['account'] = '汇总';
|
|
|
|
$allData['userscounts'] = $allUsersCounts;
|
|
|
|
$allData['userscounts'] = $allUsersCounts;
|
|
|
|
$allData['iosycounts'] = $allIosCounts;
|
|
|
|
$allData['iosycounts'] = $allIosCounts;
|
|
|
|
$allData['tfcounts'] = $allTFCounts;
|
|
|
|
$allData['tfcounts'] = $allTFCounts.'('.(number_format((intval($allTFCounts) / intval($allUsersCounts)),2,'.','') * 100).'%)';
|
|
|
|
$allData['supercounts'] = $allSuperCounts;
|
|
|
|
$allData['supercounts'] = $allSuperCounts;
|
|
|
|
$allData['companycounts'] = $allCompanyCounts;
|
|
|
|
$allData['companycounts'] = $allCompanyCounts;
|
|
|
|
|
|
|
|
|
|
|
|