|
@@ -111,37 +111,25 @@ class Counts extends Base {
|
|
|
$params = $request->param();
|
|
|
$where[] = ' e.film_type=2';
|
|
|
foreach ($params as $k=>$v) {
|
|
|
+ if(empty($v)){
|
|
|
+ continue ;
|
|
|
+ }
|
|
|
switch($k){
|
|
|
case 'upload_datetime1':
|
|
|
- if($params['upload_datetime1'] == null){
|
|
|
- continue 2;
|
|
|
- }
|
|
|
$where[] = ' s.createdAt > \''.$params['upload_datetime1'].'\' ';
|
|
|
break;
|
|
|
case 'upload_datetime2':
|
|
|
- if($params['upload_datetime2'] == null){
|
|
|
- continue 2;
|
|
|
- }
|
|
|
$where[] = ' s.createdAt < \''.$params['upload_datetime2'].'\' ';
|
|
|
break;
|
|
|
case 'exam_datetime1':
|
|
|
- if($params['exam_datetime1'] == null){
|
|
|
- continue 2;
|
|
|
- }
|
|
|
$exam1 = str_replace('-', '', $params['exam_datetime1']);
|
|
|
$where[] = ' s.studydate > \''.$exam1.'\' ';
|
|
|
break;
|
|
|
case 'exam_datetime2':
|
|
|
- if($params['exam_datetime2'] == null){
|
|
|
- continue 2;
|
|
|
- }
|
|
|
$exam2 = str_replace('-', '', $params['exam_datetime2']);
|
|
|
$where[] = ' s.studydate < \''.$exam2.'\' ';
|
|
|
break;
|
|
|
case 'exam_class':
|
|
|
- if($params['exam_class'] == null){
|
|
|
- continue 2;
|
|
|
- }
|
|
|
$where[] = 's.modality=\''.$params['exam_class'].'\' ';
|
|
|
break;
|
|
|
}
|