lgy 1 day ago
parent
commit
6764520d18

+ 2 - 2
server/application/api/controller/butt/ButtController.php

@@ -419,10 +419,10 @@ class ButtController extends ZskkDefaultApiController
         if(is_array($data))
         if(is_array($data))
         {
         {
             // todo
             // todo
-            $service->saveDmReport($data);
+            $id = $service->saveDmReport($data);
+            return $this->success($id);
         }else{
         }else{
             $this->throwError($data,9001);
             $this->throwError($data,9001);
         }
         }
-        return $this->success('success');
     }
     }
 }
 }

+ 3 - 2
server/application/api/servies/butt/ButtService.php

@@ -2265,7 +2265,7 @@ class ButtService extends ZskkDefaultService {
         {
         {
             $report['id'] = UUIDUtils::uuid();
             $report['id'] = UUIDUtils::uuid();
             $this->butt->insertReport($report);
             $this->butt->insertReport($report);
-            return '';
+            return  $report['id'];
         }else{
         }else{
             $report['exam_id'] = $exam['id'];
             $report['exam_id'] = $exam['id'];
             $old = $this->butt->getReportData(['exam_id'=>$exam['id'],'type'=>1],'*');
             $old = $this->butt->getReportData(['exam_id'=>$exam['id'],'type'=>1],'*');
@@ -2276,9 +2276,10 @@ class ButtService extends ZskkDefaultService {
                 $this->butt->insertReport($report);
                 $this->butt->insertReport($report);
             }else{
             }else{
                 $this->butt->updateReport($report,['id'=>$old['id']]);
                 $this->butt->updateReport($report,['id'=>$old['id']]);
+                $report['id'] = $old['id'];
             }
             }
             $this->butt->updateExam(['exam_status'=>9],$exam['id']);
             $this->butt->updateExam(['exam_status'=>9],$exam['id']);
-            return 'success';
+            return $report['id'];
         }
         }
     }
     }