选路细节只进日志,界面只留结果
现场反馈「校验完成了还显示【选路】是什么意思」。那些行本来是给排障用的 (局域网设备管理服务 → 云端 → 本机直连 三级降级),操作员看只会困惑, 而且降级链一长,结果和过程就混在一起。 - [选路] / [时钟] 全部改写日志([route] / [playback]) - 界面只保留:正在校验第 N 路、[有录像]/[无录像]/[失败]、校验完成总结 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
7b4705c73c
commit
950b16a0dd
@ -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));
|
||||
}
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
<ServerBaseUrl Condition="'$(Configuration)' == 'Debug' and '$(ServerBaseUrl)' == ''">http://127.0.0.1:7300</ServerBaseUrl>
|
||||
<ServerBaseUrl Condition="'$(Configuration)' == 'Release' and '$(ServerBaseUrl)' == ''">https://packs.example.com</ServerBaseUrl>
|
||||
|
||||
<Version>1.0.111</Version>
|
||||
<Version>1.0.112</Version>
|
||||
<Product>浜戜粨瑙嗛婧簮杞欢</Product>
|
||||
<Company>浜戜粨</Company>
|
||||
<AssemblyTitle>浜戜粨瑙嗛婧簮杞欢锛堟湰鏈烘湇鍔★級</AssemblyTitle>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user