|
@@ -151,8 +151,8 @@ class Report extends Base
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $page = $_REQUEST['page'];
|
|
|
- $num = $_REQUEST['num'];
|
|
|
+ $page = $_REQUEST['page'];
|
|
|
+ $num = $_REQUEST['num'];
|
|
|
$fnum = ($page-1)*$num;
|
|
|
$limit = " limit ".$fnum.",".$num;
|
|
|
/*if(empty($where)){
|
|
@@ -166,19 +166,19 @@ class Report extends Base
|
|
|
$sql = '('.$sql1.') union ('.$sql2.') union ('.$sql3.')'.$limit;
|
|
|
}else{*/
|
|
|
|
|
|
- $sql = "SELECT a.id,a.severe,a.urgent,a.is_remote,a.accession_num,a.patient_num,a.exam_report,a.study_id,a.exam_datetime,a.exam_project,a.exam_status,a.exam_class,a.application_doctor,a.application_department,p.name,p.sex,p.age,ra.report_status FROM (exams as a,patient_infos as p) LEFT JOIN remote_application as ra on ra.exam_id=a.id where a.institution_id='".$doctor['institution_id']."' and p.id=a.patient_id and a.status=1 ".$where." order by a.createdAt desc".$limit;
|
|
|
+ $sql = "SELECT a.id,a.severe,a.urgent,a.is_remote,a.accession_num,a.patient_num,a.exam_report,a.study_id,a.exam_datetime,a.exam_project,a.exam_status,a.exam_class,a.application_doctor,a.application_department,p.name,p.sex,p.age,ra.report_status FROM (exams as a,patient_infos as p) LEFT JOIN remote_application as ra on ra.exam_id=a.id where a.institution_id='".$doctor['institution_id']."' and p.id=a.patient_id and a.status=1 ".$where." order by a.createdAt desc".$limit;
|
|
|
// }
|
|
|
-
|
|
|
- if($doctor['institution_id'] == '13000003' and $page == 1 and empty($where)){
|
|
|
- if(Cache::get('13000003_2')){
|
|
|
- $list = Cache::get('13000003_2');
|
|
|
- }else{
|
|
|
- $list = DB::query($sql);
|
|
|
- Cache::set('13000003_2',$list,86400);
|
|
|
- }
|
|
|
- }else{
|
|
|
- $list = DB::query($sql);
|
|
|
- }
|
|
|
+ // if($doctor['institution_id'] == '13000003' and $page == 1 and empty($where)){
|
|
|
+ // if(Cache::get('13000003_2')){
|
|
|
+ // $list = Cache::get('13000003_2');
|
|
|
+ // }else{
|
|
|
+ // $list = DB::query($sql);
|
|
|
+ // Cache::set('13000003_2',$list,86400);
|
|
|
+ // }
|
|
|
+ // }else{
|
|
|
+ // $list = DB::query($sql);
|
|
|
+ // }
|
|
|
+ $list = DB::query($sql);
|
|
|
$csql = "SELECT count(1) FROM (exams as a,patient_infos as p) LEFT JOIN remote_application as ra on ra.exam_id=a.id where a.institution_id='".$doctor['institution_id']."' and p.id=a.patient_id and a.status=1 ".$where;
|
|
|
$count = DB::query($csql);
|
|
|
log::record('请求的sql语句');
|