fuyu 5 年之前
父节点
当前提交
c0136448d5
共有 1 个文件被更改,包括 3 次插入1 次删除
  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();
             $info = array();
             $study_uid = $_REQUEST['study_uid']?? false;
             $study_uid = $_REQUEST['study_uid']?? false;
             $acc_num = $_REQUEST['acc_num']?? false;
             $acc_num = $_REQUEST['acc_num']?? false;
+            $study_info = false;
             if($study_id && strlen($study_id) == '16') {
             if($study_id && strlen($study_id) == '16') {
                 $study_info = DB::table('studies')->where('id',$study_id)->field('id,studyuid,studyid,patient_id')->find();
                 $study_info = DB::table('studies')->where('id',$study_id)->field('id,studyuid,studyid,patient_id')->find();
             } else if($study_uid) {
             } else if($study_uid) {
                 $study_info = DB::table('studies')->where('studyuid', $study_uid)->field('id,studyuid,studyid,patient_id')->find();
                 $study_info = DB::table('studies')->where('studyuid', $study_uid)->field('id,studyuid,studyid,patient_id')->find();
             } else if($acc_num) {
             } else if($acc_num) {
                 $study_info = DB::table('studies')->where('accession_num', $acc_num)->field('id,studyuid,studyid,patient_id')->find();
                 $study_info = DB::table('studies')->where('accession_num', $acc_num)->field('id,studyuid,studyid,patient_id')->find();
-            } else {
+            }
+            if(!$study_info) {
                 throw HttpResponseException('没有查找到对应检查');
                 throw HttpResponseException('没有查找到对应检查');
             }
             }
             // if(strlen($study_id) == '16'){
             // if(strlen($study_id) == '16'){