|
@@ -221,35 +221,35 @@ class ExamModel extends ZskkDefaultModel {
|
|
|
$depart_where[] = ['application_department','in',$moreWhere['application_department'][1]];
|
|
|
unset($moreWhere['application_department']);
|
|
|
}
|
|
|
- $total = $this
|
|
|
- ->alias('e')
|
|
|
-// ->join(['patient_infos'=>'p'],'p.id=e.patient_id')
|
|
|
-// ->join(['report'=>'r'], 'e.id = r.exam_id and r.type=1','LEFT')
|
|
|
- ->where($fuzzyWhere)
|
|
|
- ->where($whereDate)
|
|
|
- ->where($gradeWhere)
|
|
|
- ->where($moreWhere)
|
|
|
- ->where($depart_where)
|
|
|
- ->where($whereStatus)
|
|
|
- ->where($report_where)
|
|
|
- ->where($nameWhere)
|
|
|
- ->where($class_where)
|
|
|
- ->where('e.institution_id', $institutionId)
|
|
|
- ->where('e.status', 1)
|
|
|
- ->count();
|
|
|
- $limit = ($params['page']-1) * $params['num'];
|
|
|
- $num = $params['num'];
|
|
|
- // if($limit > $total)
|
|
|
- // {
|
|
|
- // $limit = $limit-$total;
|
|
|
- // }
|
|
|
- if($limit + $num > $total)
|
|
|
- {
|
|
|
- $num = $total-$limit;
|
|
|
- if($num < 0) {
|
|
|
- $num = 0;
|
|
|
- }
|
|
|
- }
|
|
|
+// $total = $this
|
|
|
+// ->alias('e')
|
|
|
+//// ->join(['patient_infos'=>'p'],'p.id=e.patient_id')
|
|
|
+//// ->join(['report'=>'r'], 'e.id = r.exam_id and r.type=1','LEFT')
|
|
|
+// ->where($fuzzyWhere)
|
|
|
+// ->where($whereDate)
|
|
|
+// ->where($gradeWhere)
|
|
|
+// ->where($moreWhere)
|
|
|
+// ->where($depart_where)
|
|
|
+// ->where($whereStatus)
|
|
|
+// ->where($report_where)
|
|
|
+// ->where($nameWhere)
|
|
|
+// ->where($class_where)
|
|
|
+// ->where('e.institution_id', $institutionId)
|
|
|
+// ->where('e.status', 1)
|
|
|
+// ->count();
|
|
|
+// $limit = ($params['page']-1) * $params['num'];
|
|
|
+// $num = $params['num'];
|
|
|
+// // if($limit > $total)
|
|
|
+// // {
|
|
|
+// // $limit = $limit-$total;
|
|
|
+// // }
|
|
|
+// if($limit + $num > $total)
|
|
|
+// {
|
|
|
+// $num = $total-$limit;
|
|
|
+// if($num < 0) {
|
|
|
+// $num = 0;
|
|
|
+// }
|
|
|
+// }
|
|
|
$list = $this
|
|
|
->alias('e')
|
|
|
->join(['report'=>'r'], 'e.id = r.exam_id and r.type=1','LEFT')
|
|
@@ -264,10 +264,11 @@ class ExamModel extends ZskkDefaultModel {
|
|
|
->where($class_where)
|
|
|
->where('e.institution_id', $institutionId)
|
|
|
->where('e.status', 1)
|
|
|
- ->limit($limit,$num)
|
|
|
+ ->limit(10)
|
|
|
->order($order)
|
|
|
->field($field)
|
|
|
->select();
|
|
|
+ var_dump($list);die;
|
|
|
if($institutionId == '73000003')
|
|
|
{
|
|
|
foreach ($list as $k=>$v)
|