|
@@ -15,7 +15,7 @@ namespace Pas.ScadaService.Core
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 点位关联
|
|
/// 点位关联
|
|
/// </summary>
|
|
/// </summary>
|
|
- private static readonly ConcurrentDictionary<string, List<ConditionDto>> _changeDic = new ConcurrentDictionary<string, List<ConditionDto>>();
|
|
|
|
|
|
+ private static readonly ConcurrentDictionary<string, List<ConditionDto>> ChangeDic = new ConcurrentDictionary<string, List<ConditionDto>>();
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 所有时间
|
|
/// 所有时间
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -31,13 +31,13 @@ namespace Pas.ScadaService.Core
|
|
var conditionDtoList = inputObject.ToJsonEntity<List<ConditionDto>>();
|
|
var conditionDtoList = inputObject.ToJsonEntity<List<ConditionDto>>();
|
|
foreach (var item in conditionDtoList)
|
|
foreach (var item in conditionDtoList)
|
|
{
|
|
{
|
|
- if (_changeDic.TryGetValue(HandleParam(item.Change.Replace("@(", "").Replace(")", "")), out var value))
|
|
|
|
|
|
+ if (ChangeDic.TryGetValue(HandleParam(item.Change.Replace("@(", "").Replace(")", "")), out var value))
|
|
{
|
|
{
|
|
value.Add(item);
|
|
value.Add(item);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- _changeDic.TryAdd(HandleParam(item.Change.Replace("@(", "").Replace(")", "")), new List<ConditionDto> { item });
|
|
|
|
|
|
+ ChangeDic.TryAdd(HandleParam(item.Change.Replace("@(", "").Replace(")", "")), new List<ConditionDto> { item });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//初始化数据库
|
|
//初始化数据库
|
|
@@ -91,7 +91,7 @@ namespace Pas.ScadaService.Core
|
|
data => GetValue(data.Value.Value.ToString(), data.Value.DataType));
|
|
data => GetValue(data.Value.Value.ToString(), data.Value.DataType));
|
|
foreach (var data in obj)
|
|
foreach (var data in obj)
|
|
{
|
|
{
|
|
- if (!_changeDic.TryGetValue(HandleParam(data.ItemId), out var conditionDtoList)) continue;
|
|
|
|
|
|
+ if (!ChangeDic.TryGetValue(HandleParam(data.ItemId), out var conditionDtoList)) continue;
|
|
foreach (var conditionDto in conditionDtoList)
|
|
foreach (var conditionDto in conditionDtoList)
|
|
{
|
|
{
|
|
var conditionValue = conditionDto.Value;
|
|
var conditionValue = conditionDto.Value;
|