自动查重

This commit is contained in:
wangjinlei
2026-05-18 18:34:48 +08:00
parent f99dbc6397
commit 53e6ddbd9e
7 changed files with 105 additions and 44 deletions

View File

@@ -81,10 +81,49 @@ class Plagiarism extends Base
return jsonError($rule->getError());
}
$tii = new TurnitinService();
$res = $tii->getSubmission($data['id']);
$res = $tii->parseSubmissionIngestState($data['id']);
return jsonSuccess($res);
}
public function testcconewait(){
$data = $this->request->post();
$rule = new Validate([
"checkId"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$svc = new PlagiarismService();
$res = $svc->runIngestPollStep($data['checkId']);
return jsonSuccess($res);
}
public function testcconesimilar(){
$data = $this->request->post();
$rule = new Validate([
"checkId"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$svc = new PlagiarismService();
$res = $svc->runTriggerSimilarityOnly($data['checkId']);
return jsonSuccess($res);
}
public function testcconelast(){
$data = $this->request->post();
$rule = new Validate([
"checkId"=>"require"
]);
if(!$rule->check($data)){
return jsonError($rule->getError());
}
$svc = new PlagiarismService();
$re = $svc->runPollStatus($data['checkId']);
return jsonSuccess($re);
}
/**
* 重试 = 提交一次新查重(保留历史)
*/