DESKTOP-9JTA2JJ\HP 5 lat temu
rodzic
commit
ebb3ba6187

+ 1 - 1
api/application/controllers/Map.php

@@ -38,7 +38,7 @@ class Map extends Base_Controller{
 				   L.longitude as longitude,
 				   L.latitude as latitude,
 				   L.isfaulted,
-				   N.status as netStatus,
+				   L.netstatus as netStatus,
 				   L.logtime as updatetime,
 				   L.lampvoltage,
 				   L.lampcurrent,

+ 2 - 2
api/application/models/Lamp_model.php

@@ -374,14 +374,14 @@ class Lamp_model extends Base_model {
 		}
 		$this->db->from($this->table.' as L');
 		// $this->db->join('project as P', 'L.projectid = P.id', 'left');
-        $this->db->join('network as N', 'L.networkid = N.id', 'left');
+        // $this->db->join('network as N', 'L.networkid = N.id', 'left');
         // $this->db->join('(select t1.* from alarm_info_log t1, (select lampid, max(updatetime) as maxtime from alarm_info_log group by lampid) t2 where t1.lampid = t2.lampid and t1.updatetime = t2.maxtime) as AI', 'L.id = AI.lampid', 'left');
         
         $this->db->group_by('L.id');
         if ($is_map) {
         	$this->db->order_by("L.latitude DESC");
         }else{
-        	$this->db->order_by("L.number ASC,N.networkname ASC,L.id DESC");
+        	$this->db->order_by("L.number ASC,L.id DESC");
         }
 		
         $query = $this->db->get();