作者的ai总结field

This commit is contained in:
wangjinlei
2026-05-25 13:20:00 +08:00
parent a4e645309e
commit ab7f08b06c
8 changed files with 245 additions and 31 deletions

View File

@@ -312,11 +312,20 @@ class PlagiarismService
]);
if ($status === 'COMPLETE') {
$score = isset($statusResp['overall_match_percentage'])
? floatval($statusResp['overall_match_percentage']) : 0;
$score = TurnitinService::extractOverallMatchPercentage($statusResp);
if ($score <= 0 && isset($statusResp['overall_match_percentage'])) {
$score = floatval($statusResp['overall_match_percentage']);
}
$this->log('poll complete check_id=' . $checkId . ' score=' . $score
. ' check_type=' . ($check['check_type'] ?? 'full'));
$localPdf = $this->downloadAndStorePdf($tii, $check['tii_submission_id'], $checkId);
$meta = TurnitinService::parseSimilarityReportMeta($statusResp);
if ($meta['score'] > 0) {
$score = $meta['score'];
}
$this->updateCheck($checkId, [
'state' => 3,
'similarity_score' => $score,