root 5 years ago
parent
commit
af7b4ff02d
1 changed files with 3 additions and 2 deletions
  1. 3 2
      application/inter/controller/Dcquery.php

+ 3 - 2
application/inter/controller/Dcquery.php

@@ -139,7 +139,8 @@ class Dcquery extends Controller
                 $study_info = DB::table('studies')->where('accession_num', $acc_num)->field('id,studyuid,studyid,patient_id')->find();
             }
             if(!$study_info) {
-                return '没有查找到对应检查';
+                // return '没有查找到对应检查';
+                throw new \think\exception\HttpException(404, '没有查找到1对应检查', null, []);
             }
             // if(strlen($study_id) == '16'){
             //     $study_info = DB::table('studies')->where('id',$study_id)->field('id,studyuid,studyid,patient_id')->find();
@@ -534,4 +535,4 @@ class Dcquery extends Controller
         }
         return json_encode($data);
     }
-}
+}