1.WebSocket登录注册
2.数据重发机制
This commit is contained in:
@ -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))
|
||||
{
|
||||
|
@ -291,10 +291,10 @@
|
||||
<!--状态栏-->
|
||||
<Border Margin="5,3" Grid.Row="2" Grid.ColumnSpan="2" Background="AliceBlue" CornerRadius="3">
|
||||
<Grid>
|
||||
<StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<!--<StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<pi:IotState Content="WebSocket连接" IsOk="False" Height="auto" Width="auto" InteriorHeight="13" Foreground="Gray" Background="{x:Null}"></pi:IotState>
|
||||
<Button Content="手动重连" ></Button>
|
||||
</StackPanel>
|
||||
</StackPanel>-->
|
||||
<StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<TextBlock Margin="0,0" Text="{Binding Time,StringFormat=yyyy-MM-dd HH:mm:ss,FallbackValue=2000-01-01 00:00:00}" Foreground="#FF3A90C1" VerticalAlignment="Center"></TextBlock>
|
||||
</StackPanel>
|
||||
|
@ -69,6 +69,7 @@ namespace 货架标准上位机
|
||||
{
|
||||
UserName = loginName,
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
GroupNames = LocalFile.Config.GroupName,
|
||||
PassWord = pass,
|
||||
IsNoLogin = false,
|
||||
};
|
||||
|
@ -4,13 +4,13 @@
|
||||
//货架服务器的IP和端口号
|
||||
"ApiIpHost": "http://localhost:8888/",
|
||||
//货架分区
|
||||
"GroupName": [ "A", "B", "C" ],
|
||||
"GroupName": [ "13寸智能货架", "7寸智能货架"],
|
||||
//设备类型 可以配置为每个电脑不一样
|
||||
"DeviceType": "WCS前端-开发电脑",
|
||||
"DeviceType": "WCS前端",
|
||||
//货架类型的是否开机自检
|
||||
"IsBootSelfTest": false,
|
||||
//扫码枪COM口列表
|
||||
"ScannerComList": [ "COM1", "COM2" ],
|
||||
"ScannerComList": [],
|
||||
//串口扫码枪延时
|
||||
"ScannerTimeOut": 2000,
|
||||
//系统配置
|
||||
|
Reference in New Issue
Block a user