浏览代码

xiugai tianshu

lgy 6 年之前
父节点
当前提交
06ee08f0ef
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      application/inter/controller/Reciveremote.php

+ 1 - 1
application/inter/controller/Reciveremote.php

@@ -134,7 +134,7 @@ class Reciveremote extends Base
 //            }
 //            }
             log::record($sql);
             log::record($sql);
             $list = DB::query($sql);
             $list = DB::query($sql);
-            $csql = "SELECT count(1) from exams as e,remote_application as ra,patient_infos as p,report as r where ra.exam_id=e.id and e.patient_id=p.id and r.exam_id=e.id and ra.remote_institution_id='" . $doctor['institution_id']."'".$where;
+            $csql = "SELECT count(1) from exams as e,remote_application as ra,patient_infos as p,report as r where (ra.remote_doctor_id='".$doctor['id']."' or ra.remote_doctor_id='') and ra.exam_id=e.id and e.patient_id=p.id and r.exam_id=e.id and ra.remote_institution_id='" . $doctor['institution_id']."'".$where;
             $count = DB::query($csql);
             $count = DB::query($csql);
             foreach ($list as $k => $v) {
             foreach ($list as $k => $v) {
                 $cache_key = $doctor['id'].'_'.$v['id'];
                 $cache_key = $doctor['id'].'_'.$v['id'];