|
@@ -484,6 +484,7 @@ class DiagnosticChapterService
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$kpCodesWithQuestions = \App\Models\Question::query()
|
|
$kpCodesWithQuestions = \App\Models\Question::query()
|
|
|
|
|
+ ->where('audit_status', 0) // 只获取审核通过的题目
|
|
|
->whereIn('kp_code', $kpCodes)
|
|
->whereIn('kp_code', $kpCodes)
|
|
|
->distinct()
|
|
->distinct()
|
|
|
->pluck('kp_code')
|
|
->pluck('kp_code')
|
|
@@ -546,8 +547,9 @@ class DiagnosticChapterService
|
|
|
'raw_records' => $masteryRecords->toArray(),
|
|
'raw_records' => $masteryRecords->toArray(),
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
- // 获取每个知识点的题目数量
|
|
|
|
|
|
|
+ // 获取每个知识点的题目数量(只统计审核通过的题目)
|
|
|
$questionCounts = \App\Models\Question::query()
|
|
$questionCounts = \App\Models\Question::query()
|
|
|
|
|
+ ->where('audit_status', 0) // 只获取审核通过的题目
|
|
|
->whereIn('kp_code', $kpCodes)
|
|
->whereIn('kp_code', $kpCodes)
|
|
|
->selectRaw('kp_code, COUNT(*) as count')
|
|
->selectRaw('kp_code, COUNT(*) as count')
|
|
|
->groupBy('kp_code')
|
|
->groupBy('kp_code')
|