[FEAT] 支援機台計畫性重啟狀態與語系更新

1. 修改 ProcessStatus Job,支援處理 'restarting' 狀態,並將其記錄為 INFO 層級而非警告。
2. 更新繁體中文與日文語系檔,新增「重啟中 / 再起動中」的翻譯。
3. 確保計畫性重啟不會觸發異常離線警報。
This commit is contained in:
sky121113 2026-05-14 18:07:53 +08:00
parent dd641a2fc1
commit 752d149940
3 changed files with 14 additions and 12 deletions

View File

@ -64,18 +64,18 @@ class ProcessStatus implements ShouldQueue
$machine->update($updateData);
// 若是計畫性重啟狀態,靜默處理,不寫 log避免管理後台誤報
if ($status === 'restarting') {
Log::info("ProcessStatus: Machine [{$machine->serial_no}] is restarting (planned), suppressing log.");
return;
}
// If status changed, log it
if ($oldStatus !== $status) {
$level = ($status === 'offline') ? 'warning' : 'info';
$message = ($status === 'offline')
? "Connection lost (LWT)"
: "Connection restored";
$level = 'info';
$message = "Connection restored";
if ($status === 'offline') {
$level = 'warning';
$message = "Connection lost (LWT)";
} elseif ($status === 'restarting') {
$level = 'info';
$message = "System restarting";
}
ProcessStateLog::dispatch($machine->id, $machine->company_id, $message, $level);

View File

@ -1976,5 +1976,6 @@
"Download Template": "テンプレートのダウンロード",
"Please use our standard template to ensure data compatibility.": "データの互換性を確保するために、標準テンプレートを使用してください。",
":count staff cards imported successfully": ":count 枚のスタッフカードが正常にインポートされました",
"Import failed": "インポートに失敗しました"
"Import failed": "インポート失敗",
"System restarting": "再起動中"
}

View File

@ -2025,5 +2025,6 @@
"Download Template": "下載範例檔",
"Please use our standard template to ensure data compatibility.": "請使用標準範例檔以確保資料相容性。",
":count staff cards imported successfully": "成功匯入 :count 張員工識別卡",
"Import failed": "匯入失敗"
"Import failed": "匯入失敗",
"System restarting": "重啟中"
}