This commit is contained in:
toom1996
2025-06-23 14:04:31 +08:00
parent eb155b2949
commit 52d8e71847

View File

@ -227,12 +227,12 @@ class KeywordsController extends AbstractController
$exportList = [];
// 百度PC非负率
$total = AppKeywordsMonitorTask::query()->where('is_delete', 0)->where('platform', 1)->sum('length') ?: 1;
$percent = (100 - round(count($baiduPCRes) / $total, 2)) * 100;
$percent = round(count($baiduPCRes) / $total, 2) * 100;
$exportList["百度PC端_$percent%"] = $baiduPCRes;
// 百度WAP非负率
$total = AppKeywordsMonitorTask::query()->where('is_delete', 0)->where('platform', 2)->sum('length') ?: 1;
$percent = (100 - round(count($baiduWAPRes) / $total, 2)) * 100;
$percent = round(count($baiduWAPRes) / $total, 2) * 100;
$exportList["百度WAP端_$percent%"] = $baiduWAPRes;
return ExcelHelper::exportData($this->response, list: $exportList, header: [