|
@@ -41,6 +41,7 @@ class Api extends CatchController
|
|
|
}
|
|
|
$data = [];
|
|
|
foreach ($param['list'] as $item) {
|
|
|
+ $onetime= TagHistory::where("mac",$mac)->where('lable',$item['label'])->order("id","desc")->value("time");
|
|
|
$data[] = [
|
|
|
'mac' => $mac,
|
|
|
'lable' => $item['label'],
|
|
@@ -52,6 +53,7 @@ class Api extends CatchController
|
|
|
'temperature' => empty($item['temperature']) ? 0 : $item['temperature'],
|
|
|
//告警
|
|
|
'temperWarn' => empty($item['temperWarn']) ? 00 : $item['temperWarn'],
|
|
|
+ "interval_time"=>empty($onetime) ?0:($item['time']-$onetime)
|
|
|
];
|
|
|
}
|
|
|
$tage = new TagHistory();
|