diff --git a/BPASmartClient.Business/Plugin/DeviceMgr.cs b/BPASmartClient.Business/Plugin/DeviceMgr.cs index b4f6475f..533e73a2 100644 --- a/BPASmartClient.Business/Plugin/DeviceMgr.cs +++ b/BPASmartClient.Business/Plugin/DeviceMgr.cs @@ -1,5 +1,7 @@ using BPASmartClient.Device; +using BPASmartClient.EventBus; using BPASmartClient.Helper; +using BPASmartClient.Model; using BPASmartClient.Peripheral; using System; using System.Collections.Generic; @@ -63,7 +65,12 @@ namespace BPASmartClient.Business public void StartService() { - this.devices.ForEach(device => device.StartMain()); + this.devices.ForEach(device => + { + device.StartMain(); + //todo请求数据 + new RecipeBomEvent() { Id = device.DeviceId}.Publish(); + }); } public void StopService() diff --git a/BPASmartClient.Model/物料数据/MaterialDeliveryEvent.cs b/BPASmartClient.Model/物料数据/MaterialDeliveryEvent.cs index 39139f02..df679282 100644 --- a/BPASmartClient.Model/物料数据/MaterialDeliveryEvent.cs +++ b/BPASmartClient.Model/物料数据/MaterialDeliveryEvent.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace BPASmartClient.Model.物料数据 +namespace BPASmartClient.Model { public class MaterialDeliveryEvent : BaseEvent { diff --git a/BPASmartClient.Model/物料数据/RecipeBomEvent.cs b/BPASmartClient.Model/物料数据/RecipeBomEvent.cs index 9c9ad4c4..3acd03a9 100644 --- a/BPASmartClient.Model/物料数据/RecipeBomEvent.cs +++ b/BPASmartClient.Model/物料数据/RecipeBomEvent.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace BPASmartClient.Model.物料数据 +namespace BPASmartClient.Model { public class RecipeBomEvent : BaseEvent {