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