mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-11-04 17:43:58 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f78f81c1c |
@@ -1,8 +1,8 @@
|
|||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PluginVersion>10.6.6</PluginVersion>
|
<PluginVersion>10.6.7</PluginVersion>
|
||||||
<ProPluginVersion>10.6.6</ProPluginVersion>
|
<ProPluginVersion>10.6.7</ProPluginVersion>
|
||||||
<AuthenticationVersion>2.1.7</AuthenticationVersion>
|
<AuthenticationVersion>2.1.7</AuthenticationVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class ControlController : ControllerBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[HttpPost("writeVariables")]
|
[HttpPost("writeVariables")]
|
||||||
[DisplayName("写入变量")]
|
[DisplayName("写入变量")]
|
||||||
public async Task<Dictionary<string, Dictionary<string, IOperResult>>> WriteVariablesAsync([FromBody] Dictionary<string, Dictionary<string, string>> deviceDatas)
|
public async Task<Dictionary<string, Dictionary<string, OperResult>>> WriteVariablesAsync([FromBody] Dictionary<string, Dictionary<string, string>> deviceDatas)
|
||||||
{
|
{
|
||||||
foreach (var deviceData in deviceDatas)
|
foreach (var deviceData in deviceDatas)
|
||||||
{
|
{
|
||||||
@@ -141,7 +141,7 @@ public class ControlController : ControllerBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return await GlobalData.RpcService.InvokeDeviceMethodAsync($"WebApi-{UserManager.UserAccount}-{App.HttpContext?.GetRemoteIpAddressToIPv4()}", deviceDatas).ConfigureAwait(false);
|
return (await GlobalData.RpcService.InvokeDeviceMethodAsync($"WebApi-{UserManager.UserAccount}-{App.HttpContext?.GetRemoteIpAddressToIPv4()}", deviceDatas).ConfigureAwait(false)).ToDictionary(a => a.Key, a => a.Value.ToDictionary(b => b.Key, b => (OperResult)b.Value));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,10 +120,7 @@ public class ChannelRuntime : Channel, IChannelOptions, IDisposable
|
|||||||
// 通过插件名称获取插件信息
|
// 通过插件名称获取插件信息
|
||||||
PluginInfo = GlobalData.PluginService.GetList().FirstOrDefault(A => A.FullName == PluginName);
|
PluginInfo = GlobalData.PluginService.GetList().FirstOrDefault(A => A.FullName == PluginName);
|
||||||
|
|
||||||
if (PluginInfo == null)
|
GlobalData.Channels.TryRemove(Id, out _);
|
||||||
{
|
|
||||||
//throw new Exception($"Plugin {PluginName} not found");
|
|
||||||
}
|
|
||||||
|
|
||||||
GlobalData.Channels.TryAdd(Id, this);
|
GlobalData.Channels.TryAdd(Id, this);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>10.6.6</Version>
|
<Version>10.6.7</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user