fcy 4 éve
szülő
commit
2622dc5382
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      application/web/controller/IndexController.php

+ 2 - 1
application/web/controller/IndexController.php

@@ -207,9 +207,10 @@ class IndexController extends MainController
             ->join('realtimedata rt', 'rt.DEVICEID=d.DEVICEID and rt.PRIMARYADDR=d.PRIMARYADDR', 'left')
             ->field('d.*,rt.STATUS,rt.LASTTRANSDATE')
             ->select();
-       // $arr = array(1 => '80℃', 2 => '2:100℃', 3 => '130℃');
+        $arr = array(1 => '80℃', 2 => '2:100℃', 3 => '130℃');
         $sta = array('在线', '报警', '不在线', '未配置');
         foreach ($deviceinfo as $k => &$v) {
+            $v['TEMPERTHRESHOLD'] = array_key_exists((int)$v['TEMPERTHRESHOLD'],$arr)?$arr[(int)$v['TEMPERTHRESHOLD']]:1;
             $v['STATUS'] = $sta[is_null($v['STATUS'])? 3:$v['STATUS']];
         }