diff --git a/BPASmartClient.Business/Plugin/DeviceMgr.cs b/BPASmartClient.Business/Plugin/DeviceMgr.cs index 045e0770..7c05e85d 100644 --- a/BPASmartClient.Business/Plugin/DeviceMgr.cs +++ b/BPASmartClient.Business/Plugin/DeviceMgr.cs @@ -80,9 +80,10 @@ namespace BPASmartClient.Business try { int PushType = i;//0:主料 1:辅料 - var jsondata = new { device.DeviceId, PushType }; - string header = $"[{InternetInfo.StockServer}/stock/GetItemInfo]_[{DateTime.Now.Ticks}]".AESEncrypt(); - string url = $"{InternetInfo.StockServer}/stock/GetItemInfo"; + int clientId = device.DeviceId; + var jsondata = new { clientId, PushType }; + string header = $"[/stock/GetItemInfo]_[{DateTime.Now.Ticks}]".AESEncrypt(); + string url = $"{InternetInfo.StockServer}GetItemInfo"; result = APIHelper.GetInstance.HttpRequest(url, header, jsondata, RequestType.POST); if (PushType == 1) @@ -96,12 +97,17 @@ namespace BPASmartClient.Business } else if (PushType == 0) { + var apiData = JsonConvert.DeserializeObject(result); EventBus.EventBus.GetInstance().Publish(new MaterialDeliveryEvent() { Id = device.DeviceId, - orderMaterialDelivery = JsonConvert.DeserializeObject(result) + orderMaterialDelivery = apiData }); MessageLog.GetInstance.Show("接收到物料信息"); + apiData?.BatchingInfo?.ForEach(x => + { + MessageLog.GetInstance.Show($"物料ID:=[{x.BatchingId}],{x.BatchingLoc}号位置:{x.BatchingCount}"); + }); } } catch (Exception ex) @@ -114,6 +120,8 @@ namespace BPASmartClient.Business }); } + + public void StopService() { this.devices.ForEach(device => device.Stop()); diff --git a/BPASmartClient.Business/TopicDefine.cs b/BPASmartClient.Business/TopicDefine.cs index fe3db646..38fa60d0 100644 --- a/BPASmartClient.Business/TopicDefine.cs +++ b/BPASmartClient.Business/TopicDefine.cs @@ -29,8 +29,11 @@ namespace BPASmartClient.Business PushHeartbeatTopics = new Dictionary(); foreach (var device in devices) { - SubscribTopics.Add(TOPIC.GetInstance.GetOrderPushTopic(device.DeviceType, Plugin.GetInstance().GetPlugin().ClientId)); - SubscribTopics.Add(TOPIC.GetInstance.GetBusinessTopic(device.DeviceType, Plugin.GetInstance().GetPlugin().ClientId)); + //SubscribTopics.Add(TOPIC.GetInstance.GetOrderPushTopic(device.DeviceType, Plugin.GetInstance().GetPlugin().ClientId)); + //SubscribTopics.Add(TOPIC.GetInstance.GetBusinessTopic(device.DeviceType, Plugin.GetInstance().GetPlugin().ClientId)); + + SubscribTopics.Add(TOPIC.GetInstance.GetOrderPushTopic(device.DeviceType, device.DeviceId)); + SubscribTopics.Add(TOPIC.GetInstance.GetBusinessTopic(device.DeviceType, device.DeviceId)); PushHeartbeatTopics.Add(device.DeviceType, TOPIC.GetInstance.GetHeatbeatTopic(device.DeviceType)); } diff --git a/BPASmartClient.CustomResource/Themes/GenricStyle.xaml b/BPASmartClient.CustomResource/Themes/GenricStyle.xaml index 0e24600d..e9d1161a 100644 --- a/BPASmartClient.CustomResource/Themes/GenricStyle.xaml +++ b/BPASmartClient.CustomResource/Themes/GenricStyle.xaml @@ -1,252 +1,459 @@ - + - + - - - - - - + + + + + + - + - - - - - + + + + + - - + - + - + - - - - + - - - + + + - - - - + VerticalAlignment="Center" + ContentSource="Header" + RecognizesAccessKey="True" /> + + + - + - + - - + + - + @@ -1466,129 +1895,132 @@ - - + + - + - - + + - + - - + + - + - + - + - + - - - + + + - + - - + + - - - + + + - - + + - + - + - - + + - + - + - + - + - + + - - + + - + - - + + - - - - - - - + + + + + + + - + @@ -1665,93 +2094,110 @@ - + - - + + - + - + - + - - + - + - + - + - + @@ -1821,31 +2291,35 @@ - + - + M 0 0 L 3.5 4 L 7 0 Z - + - - - - + + + + - + - - + + - + - + - - + + - + - - - + + + - - + + - - + + - + - - - + + + - + - - + + - + - + - + - + - + - + - + - + - + - + @@ -230,17 +254,17 @@ - + - + - - + + @@ -450,7 +480,7 @@ - + @@ -460,7 +490,7 @@ - + @@ -470,7 +500,7 @@ - + @@ -480,7 +510,7 @@ - + @@ -488,13 +518,13 @@ - + - - @@ -1026,7 +1125,7 @@ - + - + - + - - - - +