刘桂岩 3 年之前
父节点
当前提交
b353454636
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      application/inter/controller/Registerlist.php

+ 4 - 4
application/inter/controller/Registerlist.php

@@ -121,13 +121,13 @@ class Registerlist extends Base
             $list = DB::query($sql);
             foreach ($list as $k => $v) {
                 $report_info = DB::table('report')->where('exam_id',$v['id'])->field(['report_datetime','report_doctor_id'])->find();
-                $list[$k]['report_datetime'] = $report_info['report_datetime'];
+                $list[$k]['report_datetime'] = $report_info['report_datetime'] ?? null;
                 $project = DB::table('exam_project')->where('id',$v['exam_project'])->field('name')->find();
-                $list[$k]['exam_project_name'] = $project['name'];
+                $list[$k]['exam_project_name'] = $project['name'] ?? null;
                 $dinfo = DB::table('doctors')->where('id',$report_info['report_doctor_id'])->field('realname,institution_id')->find();
-                $list[$k]['report_doctor'] = $dinfo['realname'];
+                $list[$k]['report_doctor'] = $dinfo['realname'] ?? null;
                 $institution_name = DB::table('institution')->where('id',$dinfo['institution_id'])->cache(300)->field('name')->find();
-                $list[$k]['institution_name'] = $institution_name['name'];
+                $list[$k]['institution_name'] = $institution_name['name'] ?? null;
             }
             $sql1 = "SELECT count(1) from exams as e ,patient_infos as p where e.institution_id='".$doctor['institution_id']."' and p.id=e.patient_id and e.status!=0 ".$where;
             $count = DB::query($sql1);