調整心跳封包邏輯 20250701
svr 改到0
This commit is contained in:
parent
da4ef0f0f3
commit
6e889e2e5f
@ -156,7 +156,11 @@ class RoomControlController extends Controller
|
||||
if (preg_match('/^([A-Za-z]+)(\d+)$/', $validated['hostname'], $matches)) {
|
||||
$roomType = strtolower($matches[1]); // 'PC' → 'pc'
|
||||
$roomName = $matches[2]; // '101'
|
||||
$floor = (int) substr($roomName, 0, 1);
|
||||
if($roomType =='svr'){
|
||||
$floor = '0';
|
||||
} else{
|
||||
$floor = (int) substr($roomName, 0, 1);
|
||||
}
|
||||
}
|
||||
$branch=Branch::where('name',$validated['branch_name'])->first();
|
||||
$room = Room::firstOrNew([
|
||||
|
Loading…
x
Reference in New Issue
Block a user