Browse Source

no message

DESKTOP-9JTA2JJ\HP 5 years ago
parent
commit
64315624c8
1 changed files with 5 additions and 2 deletions
  1. 5 2
      api/application/controllers/Alarm.php

+ 5 - 2
api/application/controllers/Alarm.php

@@ -62,8 +62,11 @@ class Alarm extends Base_Controller {
 			$where[] = 'AI.status = '.$status;
 		}
 		if(!empty($alarmtype)) $filter['alarmtype'] = $alarmtype;
-		if(isset($endDate)) $filter['endDate'] = $endDate;
-		if(isset($startDate)) $filter['startDate'] = $startDate;
+		if(!empty($alarmtype)) $where[] = 'AI.alarmtype like "%'$alarmtype.'%"';
+		// if(isset($endDate)) $filter['endDate'] = $endDate;
+		if(isset($endDate)) $where = 'AI.updatetime <= "'.$endDate.'"';
+		if(isset($startDate)) $where = 'AI.updatetime >= "'.$startDate.'"';
+		// if(isset($startDate)) $filter['startDate'] = $startDate;
 
 		if (empty($download)) {
 			if (empty($type)) {