diff --git a/Admin.Core.Socket/TouchSocketService.cs b/Admin.Core.Socket/TouchSocketService.cs
index d82de4d9..71c1b28c 100644
--- a/Admin.Core.Socket/TouchSocketService.cs
+++ b/Admin.Core.Socket/TouchSocketService.cs
@@ -68,7 +68,7 @@ namespace Admin.Core.Socket
return EasyTask.CompletedTask;
};//有客户端正在连接
service.Connected = (client, e) => { client.Logger.Info($"{client.IP}:{client.Port} 客户端连接成功!目前客户端连接数{service.Count}");
-
+ log.Info($"{client.IP}:{client.Port} 客户端连接成功!目前客户端连接数{service.Count}");
SetProdStoreClientId(client);
return EasyTask.CompletedTask;
@@ -89,6 +89,7 @@ namespace Admin.Core.Socket
try
{
var mes = Encoding.UTF8.GetString(e.ByteBlock.Buffer, 0, e.ByteBlock.Len);//注意:数据长度是byteBlock.Len
+ log.Info("原始报文:"+mes);
//心跳包
if (mes== "heartbeat")
{
@@ -104,6 +105,7 @@ namespace Admin.Core.Socket
}
else
{
+ log.Info("条码报文:" + mes);
ReceiveCodeDelegateEvent?.Invoke(client.IP,mes);
client.Logger.Info($"已从{client.IP}:{client.Port}》接收到信息:{mes}");
}
diff --git a/Aucma.Core.CodeBinding/appsettings.json b/Aucma.Core.CodeBinding/appsettings.json
index e7610a5b..3020bd66 100644
--- a/Aucma.Core.CodeBinding/appsettings.json
+++ b/Aucma.Core.CodeBinding/appsettings.json
@@ -223,7 +223,7 @@
"Enabled": true,
//"IP": "127.0.0.1",
// "Port": 6000
- "IP": "10.10.92.72",
+ "IP": "10.10.92.70",
"Port": 2014
},
{
@@ -232,7 +232,7 @@
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.22",
- "Port": 2015
+ "Port": 2014
},
{
"Id": 3,
@@ -240,7 +240,7 @@
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.29",
- "Port": 2015
+ "Port": 2014
},
{
"Id": 4,
@@ -248,7 +248,7 @@
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.10",
- "Port": 2015
+ "Port": 2014
},
{
"Id": 5,
@@ -256,7 +256,7 @@
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.1",
- "Port": 2015
+ "Port": 2014
},
{
"Id": 6,
@@ -264,7 +264,7 @@
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.49",
- "Port": 2015
+ "Port": 2014
},
{
"Id": 7,
diff --git a/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs b/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs
index 07de3695..61b8647e 100644
--- a/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs
+++ b/Aucma.Core.Palletiz/ViewModels/MainWindowViewModel.cs
@@ -26,7 +26,7 @@ namespace Aucma.Core.Palletiz.ViewModels
///
/// 扫描记录刷新
///
- public delegate void RefreshInfo();
+ public delegate Task RefreshInfo();
public static event RefreshInfo? RefreshInfoEvent;
diff --git a/Aucma.Core.Palletiz/ViewModels/StatisticsPageViewModel.cs b/Aucma.Core.Palletiz/ViewModels/StatisticsPageViewModel.cs
index 2f4d9643..69cfb168 100644
--- a/Aucma.Core.Palletiz/ViewModels/StatisticsPageViewModel.cs
+++ b/Aucma.Core.Palletiz/ViewModels/StatisticsPageViewModel.cs
@@ -32,15 +32,15 @@ namespace Aucma.Core.Palletiz.ViewModels
#region 加载DataGrid数据
- private async void LoadData()
+ private async Task LoadData()
{
- //Task.Run(() =>
- //{
+ await Task.Run(() =>
+ {
try
{
- List list = await _recordInstoreServices.QueryAsync(x => (x.StoreCode == storeCodeA || x.StoreCode == storeCodeB) && x.InStoreTime >= DateTime.Today);
+ List list = _recordInstoreServices.QueryAsync(x => (x.StoreCode == storeCodeA || x.StoreCode == storeCodeB) && x.InStoreTime >= DateTime.Today).Result;
if (list != null && list.Count > 0)
{
list.OrderByDescending(x => x.InStoreTime);
@@ -58,7 +58,7 @@ namespace Aucma.Core.Palletiz.ViewModels
Console.WriteLine("" + ex.Message.ToString());
}
- // });
+ });
//MaterialDataGrid.Add(new MaterialComplateInfo() { No = 1, ProductPlanCode = "8659452123",MaterialCode = "8659452123", MaterialName = "SC-AUCMA-农夫山泉,SC", PlanAmount = 50, CompleteAmount = 10 });
@@ -84,9 +84,11 @@ namespace Aucma.Core.Palletiz.ViewModels
/// 查询
///
[RelayCommand]
- private void ExecQuery(object obj)
+ private async Task ExecQuery(object obj)
{
-
+ await Task.Run(() =>
+ {
+
string result = (string)obj;
List list = _recordInstoreServices.QueryAsync(x => (x.StoreCode == storeCodeA || x.StoreCode == storeCodeB) && x.BarCodeCode.Contains(result)).Result;
if (list != null && list.Count > 0)
@@ -100,11 +102,7 @@ namespace Aucma.Core.Palletiz.ViewModels
});
}
}
-
-
-
-
-
+ });
}
#endregion
}