master
sunke 5 years ago
parent 6e016f67e7
commit e8f4632f90

@ -2363,8 +2363,17 @@ public function iosDetailExcelInfo($id,$map) {
$allTFMap['create_time'] = $map['create_time']; $allTFMap['create_time'] = $map['create_time'];
$companyMap['create_time'] = $map['create_time']; $companyMap['create_time'] = $map['create_time'];
$allSuperMap['create_time'] = $map['create_time']; $allSuperMap['create_time'] = $map['create_time'];
$iosTimeMap['register_time'] = $map['create_time']; // $iosTimeMap['register_time'] = $map['create_time'];
$map10['register_time'] = $map['create_time'];
$alliosMap['register_time'] = $map['create_time']; $alliosMap['register_time'] = $map['create_time'];
$allUserMap['register_time'] = $map['create_time'];
$allTFMap['create_time'] = $map['create_time'];
$allSuperMap['create_time'] = $map['create_time'];
$companyMap['create_time'] = $map['create_time'];
$sunday = strtotime('-1 sunday', $map['create_time'][1][1]) + 24 * 3600;
$m['create_time'] = ['between', [$sunday, $map['create_time'][1][1]]];
$iosTimeMap['register_time'] = $m['create_time'];
$alliosMap['register_time'] = $m['create_time'];
} }
if (!empty($map['id'])) { if (!empty($map['id'])) {
$map1['id'] = $map['id']; $map1['id'] = $map['id'];
@ -2382,16 +2391,20 @@ public function iosDetailExcelInfo($id,$map) {
$allUserMap['device_type'] = 2; $allUserMap['device_type'] = 2;
$allTFMap['promote_id'] = ['in', $allids]; $allTFMap['promote_id'] = ['in', $allids];
$allTFMap['type'] = 2; $allTFMap['type'] = 2;
$allSuperMap['promote_id'] = ['in', $allids]; $allSuperMap['promote_id'] = ['in', $allids];
$allSuperMap['type'] = 3; $allSuperMap['type'] = 3;
$companyMap['promote_id'] = ['in', $allids]; $companyMap['promote_id'] = ['in', $allids];
$companyMap['type'] = 1; $companyMap['type'] = 1;
$allUsersCounts = M('user', 'tab_')->where($allUserMap)->count(); $allUsersCounts = M('user', 'tab_')->where($allUserMap)->count();
$allTFCounts = M('package_download_log', 'tab_')->where($allTFMap)->count(); $allTFCounts = M('package_download_log', 'tab_')->where($allTFMap)->count();
$allSuperCounts = M('package_download_log', 'tab_')->where($allSuperMap)->count(); $allSuperCounts = M('package_download_log', 'tab_')->where($allSuperMap)->count();
$allCompanyCounts = M('package_download_log', 'tab_')->where($companyMap)->count(); $allCompanyCounts = M('package_download_log', 'tab_')->where($companyMap)->count();
$alliosMap['promote_id'] = ['in', $allids]; $alliosMap['promote_id'] = ['in', $allids];
$alliosMap['device_type'] = 2; $alliosMap['device_type'] = 2;
$allIosCounts = M('user', 'tab_')->where($alliosMap)->count(); $allIosCounts = M('user', 'tab_')->where($alliosMap)->count();
$csvFileName = $xlsName.'.csv'; $csvFileName = $xlsName.'.csv';
header('Content-Description: File Transfer'); header('Content-Description: File Transfer');
@ -2442,7 +2455,9 @@ 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, 'device_type'=>2])->count(); $map10['promote_id'] = $id;
$map10['device_type'] = 2;
$usersCounts = M('user', 'tab_')->where($map10)->count();
$tfpercent = number_format((intval($tfCounts) / intval($usersCounts)),2,'.','') * 100; $tfpercent = number_format((intval($tfCounts) / intval($usersCounts)),2,'.','') * 100;
if (intval($usersCounts) == 0) { if (intval($usersCounts) == 0) {

@ -2508,7 +2508,6 @@ class QueryController extends BaseController
$sunday = strtotime('-1 sunday', $iostime) + 24 * 3600; $sunday = strtotime('-1 sunday', $iostime) + 24 * 3600;
if (I('begtime') && I('endtime')) { if (I('begtime') && I('endtime')) {
$iostime = strtotime(I('endtime')); $iostime = strtotime(I('endtime'));
$sunday = strtotime(I('begtime'));
} }
$iosTimeMap['register_time'] = ['between', [$sunday, $iostime]]; $iosTimeMap['register_time'] = ['between', [$sunday, $iostime]];
$createTime = I('create_time', ''); $createTime = I('create_time', '');
@ -2523,7 +2522,7 @@ class QueryController extends BaseController
$tfMap['create_time'] = ['between', [$begTime, $endTime]]; $tfMap['create_time'] = ['between', [$begTime, $endTime]];
$companyMap['create_time'] = ['between', [$begTime, $endTime]]; $companyMap['create_time'] = ['between', [$begTime, $endTime]];
$superMap['create_time'] = ['between', [$begTime, $endTime]]; $superMap['create_time'] = ['between', [$begTime, $endTime]];
$map10['register_time'] = ['between', [$begTime, $endTime]];
//var_dump($map);die(); //var_dump($map);die();
$query = M('promote', 'tab_')->field(['id'])->where($map); $query = M('promote', 'tab_')->field(['id'])->where($map);
list($promotes, $pagination, $count) = $this->paginate($query); list($promotes, $pagination, $count) = $this->paginate($query);
@ -2536,6 +2535,9 @@ class QueryController extends BaseController
} }
$allPromote = M('promote', 'tab_')->field(['id'])->where($map)->select(); $allPromote = M('promote', 'tab_')->field(['id'])->where($map)->select();
$allids = array_column($allPromote, 'id'); $allids = array_column($allPromote, 'id');
if ($localId !== PID) {
array_push($allids, $localId);
}
array_push($allids, PID); array_push($allids, PID);
$map = []; $map = [];
$map['tab_package_download_log.promote_id'] = ['in', $ids]; $map['tab_package_download_log.promote_id'] = ['in', $ids];
@ -2544,6 +2546,7 @@ class QueryController extends BaseController
$listData = []; $listData = [];
$allUserMap['promote_id'] = ['in', $allids]; $allUserMap['promote_id'] = ['in', $allids];
$allUserMap['device_type'] = 2; $allUserMap['device_type'] = 2;
$allUserMap['register_time'] = ['between', [$begTime, $endTime]];
$allTFMap['promote_id'] = ['in', $allids]; $allTFMap['promote_id'] = ['in', $allids];
$allTFMap['type'] = 2; $allTFMap['type'] = 2;
$allTFMap['create_time'] = ['between', [$begTime, $endTime]]; $allTFMap['create_time'] = ['between', [$begTime, $endTime]];
@ -2588,7 +2591,9 @@ class QueryController extends BaseController
$superCounts = M('package_download_log', 'tab_')->where($superMap)->count(); //超级签下载量 $superCounts = M('package_download_log', 'tab_')->where($superMap)->count(); //超级签下载量
$listData[$key]['companycounts'] = intval($companyCounts); $listData[$key]['companycounts'] = intval($companyCounts);
$listData[$key]['supercounts'] = intval($superCounts); $listData[$key]['supercounts'] = intval($superCounts);
$usersCounts = M('user', 'tab_')->where(['promote_id' => $id, 'device_type' => 2])->count(); $map10['promote_id'] = $id;
$map10['device_type'] = 2;
$usersCounts = M('user', 'tab_')->where($map10)->count();
$listData[$key]['userscounts'] = intval($usersCounts); $listData[$key]['userscounts'] = intval($usersCounts);
$listData[$key]['tfcounts'] = intval($tfCounts); $listData[$key]['tfcounts'] = intval($tfCounts);
$listData[$key]['tfpercent'] = number_format((intval($tfCounts) / intval($usersCounts)),2,'.','') * 100; $listData[$key]['tfpercent'] = number_format((intval($tfCounts) / intval($usersCounts)),2,'.','') * 100;

@ -10,6 +10,9 @@
line-height: 34px; line-height: 34px;
height: 34px; height: 34px;
} }
.pointer-hand {
cursor: pointer;
}
</style> </style>
</block> </block>
<block name="body"> <block name="body">
@ -46,7 +49,7 @@
<th>推广员账号</th> <th>推广员账号</th>
<th>IOS用户总数</th> <th>IOS用户总数</th>
<th>新增IOS用户总数</th> <th>新增IOS用户总数</th>
<th title="TF下载次数/IOS用户总数">TF下载次数</th> <th class="pointer-hand" title="TF下载次数/IOS用户总数">TF下载次数</th>
<th>超级签下载次数</th> <th>超级签下载次数</th>
<th>企业签下载次数</th> <th>企业签下载次数</th>
<th>所属会长</th> <th>所属会长</th>

Loading…
Cancel
Save