From 950b16a0dd9404921cb9f837542b4316a418dd8b Mon Sep 17 00:00:00 2001 From: liufumingren Date: Thu, 22 Oct 2026 03:34:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E8=B7=AF=E7=BB=86=E8=8A=82=E5=8F=AA?= =?UTF-8?q?=E8=BF=9B=E6=97=A5=E5=BF=97=EF=BC=8C=E7=95=8C=E9=9D=A2=E5=8F=AA?= =?UTF-8?q?=E7=95=99=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 现场反馈「校验完成了还显示【选路】是什么意思」。那些行本来是给排障用的 (局域网设备管理服务 → 云端 → 本机直连 三级降级),操作员看只会困惑, 而且降级链一长,结果和过程就混在一起。 - [选路] / [时钟] 全部改写日志([route] / [playback]) - 界面只保留:正在校验第 N 路、[有录像]/[无录像]/[失败]、校验完成总结 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- desktop/MainWindow.xaml.cs | 13 +++++-------- desktop/YuncangTrace.LocalService.csproj | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/desktop/MainWindow.xaml.cs b/desktop/MainWindow.xaml.cs index abfacdd..827ed34 100644 --- a/desktop/MainWindow.xaml.cs +++ b/desktop/MainWindow.xaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; @@ -1289,13 +1289,13 @@ public partial class MainWindow : Window var peer = await _gateway.FindAsync(nvrs, ct).ConfigureAwait(false); if (peer is not null) { - lines.Add($"[选路] 交由设备管理服务 {peer.Display} 校验"); + AppLog.Write($"[route] {query.Code} 本机校验交给设备管理服务 {peer.Display}"); } else { // 局域网没有设备管理服务(跨公司/跨网段)→ 问云端: // 云端转给能访问 NVR 的扫码服务确认,能确认就不用本机白拉一遍。 - lines.Add("[选路] 局域网没有设备管理服务,改问云端…"); + AppLog.Write($"[route] {query.Code} 局域网没有设备管理服务,改问云端"); ShowPlayback(string.Join(Environment.NewLine, lines)); var cloud = await AskCloudCheckAsync(query.Code, ct); @@ -1329,9 +1329,6 @@ public partial class MainWindow : Window // 云端判断不了(没有在线扫码服务 / 云端不可用)→ 本机自己校验 AppLog.Write($"[route] {query.Code} 云端无法确认({(cloud is null ? "不可用" : cloud.State)})→ 本机校验"); - lines.Add(cloud is null - ? "[选路] 云端不可用,改由本机校验" - : $"[选路] 云端无法确认({cloud.State}),改由本机校验"); } try @@ -1365,7 +1362,7 @@ public partial class MainWindow : Window // 服务端没回结果:视为校验失败,降级到本机再试一次 _gateway.Invalidate(); peer = null; - lines.Add("[选路] 设备管理服务无响应,改由本机校验"); + AppLog.Write($"[route] {query.Code} 设备管理服务无响应,改由本机校验"); } else { @@ -1382,7 +1379,7 @@ public partial class MainWindow : Window credential.Username, credential.Password); if (clockNoted.Add(stream.NvrId) && Math.Abs(clock.TotalSeconds) >= 2) { - lines.Add($"[时钟] 录像机与本机相差 {clock.TotalSeconds:+0.0;-0.0} 秒,回放时间已按录像机对齐"); + AppLog.Write($"[playback] 录像机与本机相差 {clock.TotalSeconds:+0.0;-0.0} 秒,回放时间已按录像机对齐"); ShowPlayback(string.Join(Environment.NewLine, lines)); } diff --git a/desktop/YuncangTrace.LocalService.csproj b/desktop/YuncangTrace.LocalService.csproj index 405f023..3fd424b 100644 --- a/desktop/YuncangTrace.LocalService.csproj +++ b/desktop/YuncangTrace.LocalService.csproj @@ -42,7 +42,7 @@ http://127.0.0.1:7300 https://packs.example.com - 1.0.111 + 1.0.112 浜戜粨瑙嗛婧簮杞欢 浜戜粨 浜戜粨瑙嗛婧簮杞欢锛堟湰鏈烘湇鍔★級