@@ -89,6 +89,8 @@ class Alarm extends Base_Controller {
if (empty($download)) {
if (empty($type)) {
+ $where[] = 'L.controllerstatus = 5';
+
$join = array();
$join[] = ['table'=>'(select lampid,max(updatetime) as maxTime from warning_info_log group by lampid) as WI','cond'=>'WI.lampid = AI.lampid AND WI.maxTime = AI.updatetime','type'=>'inner'];
$join[] = ['table'=>'lampinfo as L','cond'=>'L.id = AI.lampid','type'=>'inner'];