|
@@ -145,6 +145,8 @@ class Home extends Base_Controller {
|
|
|
$where1[] = $key.' '.$value;
|
|
|
}
|
|
|
}
|
|
|
+ unset($where['L.netstatus =']);
|
|
|
+ $where1[] = 'L.controllerstatus = 5';
|
|
|
$where1[] = '(WI.batstatus != 0 OR WI.panelstatus != 0 OR WI.lampstatus != 0 OR WI.tempstatus != 0)';
|
|
|
$where1 = implode(' AND ', $where1);
|
|
|
$join[] = ['table'=>'(select w1.* from warning_info_log as w1 join (select lampid,max(updatetime) as maxTime from warning_info_log group by lampid) as w2 on w1.lampid = w2.lampid AND w1.updatetime = w2.maxTime) as WI','cond'=>'L.id = WI.lampid','type'=>'inner'];
|
|
@@ -311,7 +313,8 @@ class Home extends Base_Controller {
|
|
|
}
|
|
|
|
|
|
$where1 = $where;
|
|
|
- $where1[] = 'L.netstatus = 1';
|
|
|
+ // $where1[] = 'L.netstatus = 1';
|
|
|
+ $where1[] = 'L.controllerstatus = 5';
|
|
|
$where1[] = '(WI.batstatus != 0 OR WI.panelstatus != 0 OR WI.lampstatus != 0 OR WI.tempstatus != 0)';
|
|
|
$where1 = 'where '.implode(' AND ', $where1);
|
|
|
if ($type == 5) {
|