|
@@ -98,7 +98,7 @@ class Alarm extends Base_Controller {
|
|
|
$join[] = ['table'=>'lampinfo as L','cond'=>'L.id = AI.lampid','type'=>'inner'];
|
|
|
$join[] = ['table'=>'project as P','cond'=>'P.id = L.projectid','type'=>'inner'];
|
|
|
$join[] = ['table'=>'global_location as G','cond'=>'G.id = P.cityid','type'=>'inner'];
|
|
|
- $where[] = '(AI.batstatus != 0 OR AI.panelstatus != 0 OR AI.lampstatus != 0 OR AI.tempstatus != 0)';
|
|
|
+ $where[] = '(AI.batstatus != 0 OR AI.panelstatus != 0 OR AI.lampstatus != 0 OR AI.tempstatus != 0 OR AI.onlinestatus != 0)';
|
|
|
$where = implode(' AND ', $where);
|
|
|
$alarm = $this->Alarm_model->get_list_by_join($where, 'AI.batstatus,AI.panelstatus,AI.lampstatus,AI.tempstatus,AI.status,AI.onlinestatus,AI.updatetime,G.timezone,L.number,P.projectname as project,AI.id',$limit, $offset, $join, 'AI.updatetime DESC,id DESC', NUll, 'AI');
|
|
|
$total = $this->Alarm_model->get_list_by_multi_join($where, 'count(*) as total',null, null, $join, null, NUll, 'AI',true);
|
|
@@ -110,7 +110,7 @@ class Alarm extends Base_Controller {
|
|
|
$join[] = ['table'=>'lampinfo as L','cond'=>'L.id = AI.lampid','type'=>'inner'];
|
|
|
$join[] = ['table'=>'project as P','cond'=>'P.id = L.projectid','type'=>'inner'];
|
|
|
$join[] = ['table'=>'global_location as G','cond'=>'G.id = P.cityid','type'=>'inner'];
|
|
|
- $where[] = '(AI.batstatus != 0 OR AI.panelstatus != 0 OR AI.lampstatus != 0 OR AI.tempstatus != 0)';
|
|
|
+ $where[] = '(AI.batstatus != 0 OR AI.panelstatus != 0 OR AI.lampstatus != 0 OR AI.tempstatus != 0 OR AI.onlinestatus != 0)';
|
|
|
$where = implode(' AND ', $where);
|
|
|
$alarm = $this->Alarm_model->get_list_by_join($where, 'AI.batstatus,AI.panelstatus,AI.lampstatus,AI.tempstatus,AI.status,AI.onlinestatus,AI.updatetime,G.timezone,L.number,P.projectname as project,AI.id',$limit, $offset, $join, 'AI.updatetime DESC,id DESC', NUll, 'AI');
|
|
|
$total = $this->Alarm_model->get_list_by_multi_join($where, 'count(*) as total',null, null, $join, null, NUll, 'AI',true);
|