This commit is contained in:
MeSHard
2025-11-10 16:12:07 +08:00
parent 99f88bc53e
commit 94f7e83679
181 changed files with 15770 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace app\controller;
use think\facade\Db;
class Monitor
{
public function MonitorList(){
$list =Db::table('charge_station')->column('charge_station_name');
foreach ($list as $ll){
$message = Db::table('rtspaddr')->field('name')->where('charge_station_name',$ll)->select()->toArray();
$i = 0;
foreach ($message as $mess){
$message[$i]['station'] = $message[$i]['name'];
array_diff_key($message[$i],['name' => 'xy']);
$i+=1;
}
$kk['station'] = $ll;
$kk['children'] = $message;
$ss[] = $kk;
}
return json($ss);
}
public function MonitorId($MonitorName){
$id = Db::table('rtspaddr')->where('name',$MonitorName)->value('id');
return json(['id' => $id]);
}
}