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

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

@@ -130,13 +130,15 @@ class Dcquery extends Controller
             $info = array();
             $study_uid = $_REQUEST['study_uid']?? false;
             $acc_num = $_REQUEST['acc_num']?? false;
+            $study_info = false;
             if($study_id && strlen($study_id) == '16') {
                 $study_info = DB::table('studies')->where('id',$study_id)->field('id,studyuid,studyid,patient_id')->find();
             } else if($study_uid) {
                 $study_info = DB::table('studies')->where('studyuid', $study_uid)->field('id,studyuid,studyid,patient_id')->find();
             } else if($acc_num) {
                 $study_info = DB::table('studies')->where('accession_num', $acc_num)->field('id,studyuid,studyid,patient_id')->find();
-            } else {
+            }
+            if(!$study_info) {
                 throw HttpResponseException('没有查找到对应检查');
             }
             // if(strlen($study_id) == '16'){