This commit is contained in:
2248356998 qq.com
2025-08-07 10:19:28 +08:00
parent faa9858974
commit eb4bb2fd48
10 changed files with 14 additions and 20 deletions

View File

@@ -189,8 +189,8 @@ namespace ThingsGateway.SqlSugar
"multipart/form-data; boundary=" + boundary);
// 发送请求并处理响应
using var httpResponseMessage =
await Post(client, tableName, httpContent).ConfigureAwait(false);
using var httpResponseMessage =
await Post(client, tableName, httpContent).ConfigureAwait(false);
var readAsStringAsync = await httpResponseMessage.Content.ReadAsStringAsync().ConfigureAwait(false);
var splitByLine = QuestDbRestAPHelper.SplitByLine(readAsStringAsync);

View File

@@ -49,8 +49,8 @@ public class Variable : BaseDataEntity, IValidatableObject
private double lLAlarmCode = 0;
private long deviceId;
private int? arrayLength;
private int alarmDelay;
private int alarmLevel;
private int alarmDelay;
private int alarmLevel;
private ProtectTypeEnum protectType = ProtectTypeEnum.ReadWrite;
private DataTypeEnum dataType = DataTypeEnum.Int16;
@@ -59,7 +59,7 @@ public class Variable : BaseDataEntity, IValidatableObject
/// </summary>
[System.Text.Json.Serialization.JsonIgnore]
[Newtonsoft.Json.JsonIgnore]
internal bool IsUp;
internal bool IsUp;
private bool enable = true;
public bool DynamicVariable;
private bool rpcWriteEnable = true;

View File

@@ -67,7 +67,7 @@ public class AlarmVariable : PrimaryIdEntity, IDBHistoryAlarm
[SugarColumn(ColumnDescription = "报警等级", IsNullable = false)]
[AutoGenerateColumn(Visible = true, Filterable = true, Sortable = true)]
public int AlarmLevel { get; set; }
/// <inheritdoc cref="VariableRuntime.AlarmCode"/>
[SugarColumn(ColumnDescription = "报警值", IsNullable = false)]
[AutoGenerateColumn(Visible = true, Filterable = true, Sortable = true)]

View File

@@ -46,7 +46,7 @@ public partial class VariableRuntime : Variable, IVariable, IDisposable
private object _value;
private object lastSetValue;
private object rawValue;
internal object AlarmLockObject=new();
internal object AlarmLockObject = new();
internal bool AlarmConfirm;
private DeviceRuntime? deviceRuntime;
private IVariableSource? variableSource;

View File

@@ -233,7 +233,7 @@ internal sealed class AlarmTask : IDisposable
if (result)
{
// 如果表达式结果为true则触发报警事件
AlarmChange(item, limit, text,false, alarmEnum, delay);
AlarmChange(item, limit, text, false, alarmEnum, delay);
}
}
}
@@ -433,7 +433,7 @@ internal sealed class AlarmTask : IDisposable
{
// 如果是需恢复报警事件,则从实时报警列表中移除该变量
if(item.AlarmConfirm)
if (item.AlarmConfirm)
{
GlobalData.RealAlarmIdVariables.TryRemove(item.Id, out _);
item.EventType = EventTypeEnum.ConfirmAndFinish;

View File

@@ -1,7 +1,9 @@

using ThingsGateway.Blazor.Diagrams.Core.Geometry;
#if !Management
using ThingsGateway.Gateway.Application.Extensions;
#endif
using TouchSocket.Core;

View File

@@ -118,7 +118,7 @@ public class AlarmChangedTriggerNode : VariableNode, ITriggerNode, IDisposable
public void Dispose()
{
}
#endif

View File

@@ -102,7 +102,7 @@ public class DeviceChangedTriggerNode : TextNode, ITriggerNode, IDisposable
public void Dispose()
{
}
#endif

View File

@@ -8,10 +8,6 @@
// QQ群605534569
//------------------------------------------------------------------------------
using BootstrapBlazor.Components;
using System.ComponentModel.DataAnnotations;
using ThingsGateway.SqlSugar;
namespace ThingsGateway.Plugin.DB;
@@ -22,7 +18,7 @@ public class QuestDBProducerProperty : RealDBProducerProperty
public QuestDBProducerProperty()
{
BigTextConnectStr="host=localhost;port=8812;username=admin;password=quest;database=qdb;ServerCompatibilityMode=NoTypeLoading;";
BigTextConnectStr = "host=localhost;port=8812;username=admin;password=quest;database=qdb;ServerCompatibilityMode=NoTypeLoading;";
}
[DynamicProperty]
public bool RestApi { get; set; } = true;

View File

@@ -8,10 +8,6 @@
// QQ群605534569
//------------------------------------------------------------------------------
using BootstrapBlazor.Components;
using System.ComponentModel.DataAnnotations;
using ThingsGateway.SqlSugar;
namespace ThingsGateway.Plugin.DB;