提交整体修改

This commit is contained in:
2025-03-27 11:37:48 +08:00
parent 1046978877
commit 2d98b2d8b8
22 changed files with 2560 additions and 2032 deletions

View File

@ -101,7 +101,8 @@ namespace DH.Commons.Helper
{
ConfigModel.CameraBaseList,
ConfigModel.PLCBaseList,
ConfigModel.DetectionList
ConfigModel.DetectionList,
ConfigModel.GlobalList,
}, _jsonOptions);
// 写入新配置
@ -157,8 +158,9 @@ namespace DH.Commons.Helper
var data = JsonSerializer.Deserialize<ConfigData>(json, _jsonOptions);
ConfigModel.CameraBaseList = data?.Cameras ?? new List<CameraBase>();
ConfigModel.PLCBaseList = data?.PLCs ?? new List<PLCBase>();
ConfigModel.DetectionList = data?.Detections ?? new List<DetectionConfig>();
ConfigModel.PLCBaseList = data?.PLCs ?? new List<PLCBase>();
ConfigModel.GlobalList = data?.GlobalConfigs ?? new List<GlobalConfig>();
}
/// <summary>
@ -261,6 +263,10 @@ namespace DH.Commons.Helper
[JsonPropertyName("detectionList")]
public List<DetectionConfig> Detections { get; set; } = new List<DetectionConfig>();
[JsonPropertyName("globalList")]
public List<GlobalConfig> GlobalConfigs { get; set; } = new List<GlobalConfig>();
}
}
}