lgy 1 month ago
parent
commit
6dfdce8da5
1 changed files with 5 additions and 1 deletions
  1. 5 1
      server/application/api/servies/butt/ButtService.php

+ 5 - 1
server/application/api/servies/butt/ButtService.php

@@ -2267,7 +2267,11 @@ class ButtService extends ZskkDefaultService {
             $this->butt->updateExam($arr,$exam['id']);
             $id = $exam['id'];
         }
-        $report = $this->butt->getReportData(['exam_id'=>null,'imagenumber'=>$arr['imagenumber']]);
+        $report = $this->butt->getReportData(['exam_id'=>$id,'imagenumber'=>$arr['imagenumber']]);
+        if(empty($report))
+        {
+            $report = $this->butt->getReportData(['exam_id'=>null,'imagenumber'=>$arr['imagenumber']]);
+        }
         if(!empty($report))
         {
             $this->butt->updateReport(['exam_id'=>$id],['id'=>$report['id']]);