mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-20 18:51:28 +08:00
更新依赖
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace ThingsGateway.DataEncryption;
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<PluginVersion>10.11.73</PluginVersion>
|
||||
<ProPluginVersion>10.11.73</ProPluginVersion>
|
||||
<DefaultVersion>10.11.73</DefaultVersion>
|
||||
<PluginVersion>10.11.75</PluginVersion>
|
||||
<ProPluginVersion>10.11.75</ProPluginVersion>
|
||||
<DefaultVersion>10.11.75</DefaultVersion>
|
||||
<AuthenticationVersion>10.11.6</AuthenticationVersion>
|
||||
<SourceGeneratorVersion>10.11.6</SourceGeneratorVersion>
|
||||
<NET8Version>8.0.20</NET8Version>
|
||||
@@ -12,7 +12,7 @@
|
||||
<IsTrimmable>false</IsTrimmable>
|
||||
<ManagementProPluginVersion>10.11.70</ManagementProPluginVersion>
|
||||
<ManagementPluginVersion>10.11.70</ManagementPluginVersion>
|
||||
<TSVersion>4.0.0-beta.57</TSVersion>
|
||||
<TSVersion>4.0.0-beta.70</TSVersion>
|
||||
|
||||
|
||||
</PropertyGroup>
|
||||
|
@@ -36,7 +36,7 @@
|
||||
<EditorItem @bind-Field="@context.StopBits" Ignore=@(context.ChannelType != ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.DtrEnable" Ignore=@(context.ChannelType != ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.RtsEnable" Ignore=@(context.ChannelType != ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.StreamAsync" Ignore=@(context.ChannelType != ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.Handshake" Ignore=@(context.ChannelType != ChannelTypeEnum.SerialPort) />
|
||||
|
||||
|
||||
<EditorItem @bind-Field="@context.CacheTimeout" Ignore=@(context.ChannelType == ChannelTypeEnum.UdpSession || context.ChannelType == ChannelTypeEnum.Other) />
|
||||
|
@@ -42,7 +42,7 @@
|
||||
"PortName": "COM Port",
|
||||
"RemoteUrl": "Remote IP Address",
|
||||
"RtsEnable": "Rts",
|
||||
"StreamAsync": "StreamAsync",
|
||||
"Handshake": "Handshake",
|
||||
"SaveChannel": "Add/Modify Channel",
|
||||
"StopBits": "Stop Bits"
|
||||
},
|
||||
@@ -102,7 +102,7 @@
|
||||
"PortName": "PortName",
|
||||
"RemoteUrl": "RemoteUrl",
|
||||
"RtsEnable": "RtsEnable",
|
||||
"StreamAsync": "StreamAsync",
|
||||
"Handshake": "Handshake",
|
||||
"StopBits": "StopBits"
|
||||
}
|
||||
}
|
@@ -40,7 +40,7 @@
|
||||
"PortName": "COM口",
|
||||
"RemoteUrl": "远程url",
|
||||
"RtsEnable": "Rts",
|
||||
"StreamAsync": "串口流读写",
|
||||
"Handshake": "Handshake",
|
||||
"SaveChannel": "添加/修改通道",
|
||||
"StopBits": "停止位"
|
||||
},
|
||||
@@ -100,7 +100,7 @@
|
||||
"PortName": "COM口",
|
||||
"RemoteUrl": "远程url",
|
||||
"RtsEnable": "Rts",
|
||||
"StreamAsync": "串口流读写",
|
||||
"Handshake": "串口流读写",
|
||||
"StopBits": "停止位"
|
||||
}
|
||||
}
|
@@ -69,9 +69,9 @@ namespace ThingsGateway.Foundation
|
||||
public virtual bool DtrEnable { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// StreamAsync
|
||||
/// Handshake
|
||||
/// </summary>
|
||||
public virtual bool StreamAsync { get; set; } = false;
|
||||
public virtual Handshake Handshake { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// RtsEnable
|
||||
|
@@ -9,7 +9,6 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ThingsGateway.Foundation.Extension.String;
|
||||
using ThingsGateway.NewLife;
|
||||
|
||||
using TouchSocket.SerialPorts;
|
||||
|
||||
@@ -141,10 +140,19 @@ public static class ChannelOptionsExtensions
|
||||
/// <returns></returns>
|
||||
private static SerialPortChannel GetSerialPort(this TouchSocketConfig config, IChannelOptions channelOptions)
|
||||
{
|
||||
var serialPortOption = FastMapper.Mapper<IChannelOptions,SerialPortOption>(channelOptions);
|
||||
serialPortOption.ThrowIfNull(nameof(SerialPortOption));
|
||||
channelOptions.ThrowIfNull(nameof(SerialPortOption));
|
||||
channelOptions.Config = config;
|
||||
config.SetSerialPortOption(serialPortOption);
|
||||
config.SetSerialPortOption(options =>
|
||||
{
|
||||
options.PortName = channelOptions.PortName;
|
||||
options.BaudRate = channelOptions.BaudRate;
|
||||
options.DataBits = channelOptions.DataBits;
|
||||
options.Parity = channelOptions.Parity;
|
||||
options.StopBits = channelOptions.StopBits;
|
||||
options.DtrEnable = channelOptions.DtrEnable;
|
||||
options.RtsEnable = channelOptions.RtsEnable;
|
||||
options.Handshake = channelOptions.Handshake;
|
||||
});
|
||||
//载入配置
|
||||
SerialPortChannel serialPortChannel = new SerialPortChannel(channelOptions);
|
||||
return serialPortChannel;
|
||||
|
@@ -72,11 +72,7 @@ public interface IChannelOptions
|
||||
/// </summary>
|
||||
bool RtsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// StreamAsync
|
||||
/// </summary>
|
||||
bool StreamAsync { get; set; }
|
||||
|
||||
Handshake Handshake { get; set; }
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 最大并发数量
|
||||
|
@@ -18,8 +18,6 @@ using ThingsGateway.NewLife;
|
||||
using ThingsGateway.NewLife.Collections;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
|
||||
using TouchSocket.SerialPorts;
|
||||
|
||||
namespace ThingsGateway.Foundation;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -22,7 +22,7 @@
|
||||
"PortName": "PortName",
|
||||
"RemoteUrl": "RemoteUrl",
|
||||
"RtsEnable": "RtsEnable",
|
||||
"StreamAsync": "StreamAsync",
|
||||
"Handshake": "Handshake",
|
||||
"StopBits": "StopBits"
|
||||
},
|
||||
"ThingsGateway.Foundation.ConverterConfig": {
|
||||
|
@@ -22,7 +22,7 @@
|
||||
"PortName": "COM口",
|
||||
"RemoteUrl": "远程url",
|
||||
"RtsEnable": "Rts",
|
||||
"StreamAsync": "串口流读写",
|
||||
"Handshake": "Handshake",
|
||||
"StopBits": "停止位"
|
||||
},
|
||||
"ThingsGateway.Foundation.ConverterConfig": {
|
||||
|
@@ -16,8 +16,6 @@ using ThingsGateway.NewLife.Json.Extension;
|
||||
|
||||
using TouchSocket.Core;
|
||||
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace ThingsGateway.Gateway.Application;
|
||||
|
||||
/// <summary>
|
||||
|
@@ -138,11 +138,11 @@ public class Channel : ChannelOptionsBase, IPrimaryIdEntity, IBaseDataEntity, IB
|
||||
public override bool RtsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// StreamAsync
|
||||
/// Handshake
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "StreamAsync", IsNullable = true)]
|
||||
[SugarColumn(ColumnDescription = "Handshake", IsNullable = true)]
|
||||
[AutoGenerateColumn(Visible = false, Filterable = true, Sortable = true)]
|
||||
public override bool StreamAsync { get; set; } = false;
|
||||
public override Handshake Handshake { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 缓存超时
|
||||
|
@@ -307,7 +307,7 @@
|
||||
"PortName": "PortName",
|
||||
"RemoteUrl": "RemoteUrl",
|
||||
"RtsEnable": "RtsEnable",
|
||||
"StreamAsync": "StreamAsync",
|
||||
"Handshake": "Handshake",
|
||||
"SaveChannel": "Add/Modify Channel",
|
||||
"SortCode": "SortCode",
|
||||
"StopBits": "StopBits",
|
||||
|
@@ -306,7 +306,7 @@
|
||||
"PortName": "COM口",
|
||||
"RemoteUrl": "远程url",
|
||||
"RtsEnable": "Rts",
|
||||
"StreamAsync": "串口流读写",
|
||||
"Handshake": "Handshake",
|
||||
"SaveChannel": "添加/修改通道",
|
||||
"SortCode": "排序",
|
||||
"StopBits": "停止位",
|
||||
|
@@ -110,7 +110,11 @@ internal sealed class ChannelService : BaseService<Channel>, IChannelService
|
||||
|
||||
var device = devices.Keys.ToList();
|
||||
ManageHelper.CheckDeviceCount(device.Count);
|
||||
|
||||
foreach (var item in device)
|
||||
{
|
||||
item.RedundantEnable = false;
|
||||
item.RedundantDeviceId = null;
|
||||
}
|
||||
await db.Insertable(device).ExecuteCommandAsync().ConfigureAwait(false);
|
||||
|
||||
var variable = devices.SelectMany(a => a.Value).ToList();
|
||||
|
@@ -53,7 +53,11 @@ internal sealed class DeviceService : BaseService<Device>, IDeviceService
|
||||
{
|
||||
var device = devices.Keys.ToList();
|
||||
ManageHelper.CheckDeviceCount(device.Count);
|
||||
|
||||
foreach (var item in device)
|
||||
{
|
||||
item.RedundantEnable = false;
|
||||
item.RedundantDeviceId = null;
|
||||
}
|
||||
await db.Insertable(device).ExecuteCommandAsync().ConfigureAwait(false);
|
||||
|
||||
var variable = devices.SelectMany(a => a.Value).ToList();
|
||||
@@ -263,6 +267,9 @@ internal sealed class DeviceService : BaseService<Device>, IDeviceService
|
||||
else
|
||||
ManageHelper.CheckDeviceCount(1);
|
||||
|
||||
if (input.RedundantEnable && GlobalData.IsRedundant(input.RedundantDeviceId ?? 0))
|
||||
throw Oops.Bah($"Redundancy configuration error, backup device has been planned into another redundancy group");
|
||||
|
||||
if (await base.SaveAsync(input, type).ConfigureAwait(false))
|
||||
{
|
||||
|
||||
|
@@ -114,7 +114,7 @@
|
||||
<EditorItem @bind-Field="@context.StopBits" Ignore=@(context.ChannelType != ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.DtrEnable" Ignore=@(context.ChannelType != ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.RtsEnable" Ignore=@(context.ChannelType != ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.StreamAsync" Ignore=@(context.ChannelType != ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.Handshake" Ignore=@(context.ChannelType != ChannelTypeEnum.SerialPort) />
|
||||
|
||||
|
||||
<EditorItem @bind-Field="@context.CacheTimeout" Ignore=@(context.ChannelType == ChannelTypeEnum.UdpSession || context.ChannelType == ChannelTypeEnum.Other) />
|
||||
|
@@ -82,7 +82,7 @@
|
||||
<EditorItem @bind-Field="@context.StopBits" Ignore=@(context.ChannelType!=ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.DtrEnable" Ignore=@(context.ChannelType!=ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.RtsEnable" Ignore=@(context.ChannelType!=ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.StreamAsync" Ignore=@(context.ChannelType!=ChannelTypeEnum.SerialPort) />
|
||||
<EditorItem @bind-Field="@context.Handshake" Ignore=@(context.ChannelType!=ChannelTypeEnum.SerialPort) />
|
||||
|
||||
|
||||
<EditorItem @bind-Field="@context.CacheTimeout" Ignore=@(context.ChannelType==ChannelTypeEnum.UdpSession||context.ChannelType==ChannelTypeEnum.Other) />
|
||||
|
@@ -35,7 +35,8 @@ public partial class RulesPage : ThingsGatewayModuleComponentBase
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
await base.OnAfterRenderAsync(firstRender);
|
||||
if (firstRender) {
|
||||
if (firstRender)
|
||||
{
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
@@ -14,7 +14,6 @@ using ThingsGateway.Common;
|
||||
using ThingsGateway.DB;
|
||||
using ThingsGateway.Debug;
|
||||
using ThingsGateway.Foundation;
|
||||
using ThingsGateway.Gateway.Application;
|
||||
using ThingsGateway.NewLife;
|
||||
using ThingsGateway.NewLife.Extension;
|
||||
using ThingsGateway.NewLife.Threading;
|
||||
|
@@ -11,7 +11,6 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
using MQTTnet.AspNetCore;
|
||||
|
||||
|
@@ -12,7 +12,6 @@ using CSScripting;
|
||||
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
using MQTTnet;
|
||||
using MQTTnet.Internal;
|
||||
|
Reference in New Issue
Block a user