Compare commits
No commits in common. '2550084b660b1801e680167f88813c242017a1fc' and '2666922c4e2790b31408126c171ae5ca663cd178' have entirely different histories.
2550084b66
...
2666922c4e
@ -1,31 +0,0 @@
|
|||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace OMS.NET.Instructs
|
|
||||||
{
|
|
||||||
public class BatchDeleteElementInstruct : Instruct
|
|
||||||
{
|
|
||||||
public BatchDeleteElementInstruct()
|
|
||||||
{
|
|
||||||
Type = "broadcast";
|
|
||||||
Class = "batchDeleteElement";
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Task Handler(string wsid)
|
|
||||||
{
|
|
||||||
return Task.Run(() =>
|
|
||||||
{
|
|
||||||
if (!GlobalArea.LoginCheckByID(wsid)) return;//登录检查不通过则直接退出
|
|
||||||
if (Data?.GetType() != typeof(JsonElement)) return;//Data 非空和JsonElement类型检查
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//string conveyor = GlobalArea.GetLoginEmailByID(wsid);
|
|
||||||
string time = GlobalArea.GetCurrentTime();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
GlobalArea.Log.Warn($"处理{Class}广播指令出错:" + ex.Message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
using System.Text.Json;
|
|
||||||
using OMS.NET.Common;
|
|
||||||
using OMS.NET.DbClass;
|
|
||||||
|
|
||||||
namespace OMS.NET.Instructs
|
|
||||||
{
|
|
||||||
public class CreateGroupLayerInstruct : Instruct
|
|
||||||
{
|
|
||||||
public CreateGroupLayerInstruct()
|
|
||||||
{
|
|
||||||
Type = "broadcast";
|
|
||||||
Class = "createGroupLayer";
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Task Handler(string wsid)
|
|
||||||
{
|
|
||||||
return Task.Run(() =>
|
|
||||||
{
|
|
||||||
if (!GlobalArea.LoginCheckByID(wsid)) return;//登录检查不通过则直接退出
|
|
||||||
if (Data?.GetType() != typeof(JsonElement)) return;//Data 非空和JsonElement类型检查
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string conveyor = GlobalArea.GetLoginEmailByID(wsid);
|
|
||||||
AccountData accountData = GlobalArea.GetLoginAccountData(conveyor)!;
|
|
||||||
string creator = $"{accountData.UserName}({conveyor})";
|
|
||||||
LayerData newGroupLayer = GlobalArea.CreateGroupLayer(creator);
|
|
||||||
string time = GlobalArea.GetCurrentTime();
|
|
||||||
ResponseOrBroadcastInstructs.Add(new Instruct()
|
|
||||||
{
|
|
||||||
IsBroadcast = true,
|
|
||||||
Type = "broadcast",
|
|
||||||
Class = "createGroupLayer",
|
|
||||||
Conveyor = conveyor,
|
|
||||||
Time = time,
|
|
||||||
Data = newGroupLayer
|
|
||||||
});
|
|
||||||
ResponseOrBroadcastInstructs.Add(new Instruct()
|
|
||||||
{
|
|
||||||
IsBroadcast = true,
|
|
||||||
Type = "broadcast",
|
|
||||||
Class = "updateLayerOrder",
|
|
||||||
Conveyor = conveyor,
|
|
||||||
Time = time,
|
|
||||||
Data = new{
|
|
||||||
member = GlobalArea.GetOrderLayerData().Members
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
GlobalArea.Log.Warn($"处理{Class}广播指令出错:" + ex.Message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace OMS.NET.Instructs
|
|
||||||
{
|
|
||||||
public class DeleteLayerAndMembersInstuct : Instruct
|
|
||||||
{
|
|
||||||
public DeleteLayerAndMembersInstuct()
|
|
||||||
{
|
|
||||||
Type = "broadcast";
|
|
||||||
Class = "deleteLayerAndMembers";
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Task Handler(string wsid)
|
|
||||||
{
|
|
||||||
return Task.Run(() =>
|
|
||||||
{
|
|
||||||
if (!GlobalArea.LoginCheckByID(wsid)) return;//登录检查不通过则直接退出
|
|
||||||
if (Data?.GetType() != typeof(JsonElement)) return;//Data 非空和JsonElement类型检查
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//string conveyor = GlobalArea.GetLoginEmailByID(wsid);
|
|
||||||
string time = GlobalArea.GetCurrentTime();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
GlobalArea.Log.Warn($"处理{Class}广播指令出错:" + ex.Message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace OMS.NET.Instructs
|
|
||||||
{
|
|
||||||
public class ForceUpdateDataInstruct : Instruct
|
|
||||||
{
|
|
||||||
public ForceUpdateDataInstruct()
|
|
||||||
{
|
|
||||||
Type = "broadcast";
|
|
||||||
Class = "forceUpdate";
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Task Handler(string wsid)
|
|
||||||
{
|
|
||||||
return Task.Run(() =>
|
|
||||||
{
|
|
||||||
if (!GlobalArea.LoginCheckByID(wsid)) return;//登录检查不通过则直接退出
|
|
||||||
if (Data?.GetType() != typeof(JsonElement)) return;//Data 非空和JsonElement类型检查
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//string conveyor = GlobalArea.GetLoginEmailByID(wsid);
|
|
||||||
string time = GlobalArea.GetCurrentTime();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
GlobalArea.Log.Warn($"处理{Class}广播指令出错:" + ex.Message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace OMS.NET.Instructs
|
|
||||||
{
|
|
||||||
public class RenameLayerInstruct : Instruct
|
|
||||||
{
|
|
||||||
public RenameLayerInstruct()
|
|
||||||
{
|
|
||||||
Type = "broadcast";
|
|
||||||
Class = "renameLayer";
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Task Handler(string wsid)
|
|
||||||
{
|
|
||||||
return Task.Run(() =>
|
|
||||||
{
|
|
||||||
if (!GlobalArea.LoginCheckByID(wsid)) return;//登录检查不通过则直接退出
|
|
||||||
if (Data?.GetType() != typeof(JsonElement)) return;//Data 非空和JsonElement类型检查
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//string conveyor = GlobalArea.GetLoginEmailByID(wsid);
|
|
||||||
string time = GlobalArea.GetCurrentTime();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
GlobalArea.Log.Warn($"处理{Class}广播指令出错:" + ex.Message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
using System.Text.Json;
|
|
||||||
using System.Text.Json.Nodes;
|
|
||||||
using OMS.NET.Common;
|
|
||||||
|
|
||||||
namespace OMS.NET.Instructs
|
|
||||||
{
|
|
||||||
public class UpdateLayerOrderInstruct : Instruct
|
|
||||||
{
|
|
||||||
public UpdateLayerOrderInstruct()
|
|
||||||
{
|
|
||||||
Type = "broadcast";
|
|
||||||
Class = "updateLayerOrder";
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Task Handler(string wsid)
|
|
||||||
{
|
|
||||||
return Task.Run(() =>
|
|
||||||
{
|
|
||||||
if (!GlobalArea.LoginCheckByID(wsid)) return;//登录检查不通过则直接退出
|
|
||||||
if (Data?.GetType() != typeof(JsonElement)) return;//Data 非空和JsonElement类型检查
|
|
||||||
string conveyor = GlobalArea.GetLoginEmailByID(wsid);
|
|
||||||
try
|
|
||||||
{
|
|
||||||
long active = Data.GetProperty("active").GetInt64();
|
|
||||||
long passive = Data.GetProperty("passive").GetInt64();
|
|
||||||
string type = Data.GetProperty("type").GetString();
|
|
||||||
LayerData order = GlobalArea.GetOrderLayerData();
|
|
||||||
order.AdjustOrderLayer(active, passive, type);
|
|
||||||
ResponseOrBroadcastInstructs.Add(new Instruct()
|
|
||||||
{
|
|
||||||
IsBroadcast = true,
|
|
||||||
Type = "broadcast",
|
|
||||||
Class = "updateLayerOrder",
|
|
||||||
Conveyor = conveyor,
|
|
||||||
Time = GlobalArea.GetCurrentTime(),
|
|
||||||
Data = new
|
|
||||||
{
|
|
||||||
member = order.Members
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
GlobalArea.Log.Warn($"处理{Class}广播指令出错:" + ex.Message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace OMS.NET.Instructs
|
|
||||||
{
|
|
||||||
public class UpdateTemplateDataInstruct : Instruct
|
|
||||||
{
|
|
||||||
public UpdateTemplateDataInstruct()
|
|
||||||
{
|
|
||||||
Type = "broadcast";
|
|
||||||
Class = "updateTemplateData";
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Task Handler(string wsid)
|
|
||||||
{
|
|
||||||
return Task.Run(() =>
|
|
||||||
{
|
|
||||||
if (!GlobalArea.LoginCheckByID(wsid)) return;//登录检查不通过则直接退出
|
|
||||||
if (Data?.GetType() != typeof(JsonElement)) return;//Data 非空和JsonElement类型检查
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//string conveyor = GlobalArea.GetLoginEmailByID(wsid);
|
|
||||||
string time = GlobalArea.GetCurrentTime();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
GlobalArea.Log.Warn($"处理{Class}广播指令出错:" + ex.Message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue