1.WebSocket登录注册

2.数据重发机制
This commit is contained in:
hehaibing-1996
2024-05-17 15:12:07 +08:00
parent c8ce453f74
commit 649e22b4ce
17 changed files with 200 additions and 163 deletions

View File

@ -28,6 +28,7 @@ using System.Collections.ObjectModel;
using WCS.BLL.DbModels;
using WCS.Model.ApiModel.MatBaseInfo;
using System.Security.Cryptography;
using Ping9719.WpfEx;
namespace .ViewModel
{
@ -259,6 +260,33 @@ namespace 货架标准上位机.ViewModel
if (Result != null && Result.Code == 200)
{
scanner.MatSn = Result.Data.MatSN;
#region
Task.Run(() =>
{
try
{
var body = new QueryByMatSnRequest()
{
MatSn = scanner.MatSn,
ShelfCode = scanner.ShelfCode,
IpAddress = scanner.COM,
DeviceType = LocalFile.Config.DeviceType,
UserName = LocalStatic.CurrentUser,
};
var Result = ApiHelp.GetDataFromHttp<ResponseCommon<MatInfoModel>>(LocalFile.Config.ApiIpHost + "instore/queryInstoreStatus", body, "POST");
if (Result != null && !string.IsNullOrEmpty(Result.Message))
{
TextBoxLog.AddLog(Result.Message, "InstoreLog", DateTime.Now);
scanner.MatSn = string.Empty;
scanner.ScannerDisplayControl.RefreshValues(scanner.ShelfCode, scanner.MatSn);
}
}
catch (Exception ex)
{
Growl.Warning(ex.Message);
}
});
#endregion
}
else if (Result != null && !string.IsNullOrEmpty(Result.Message))
{