diff --git a/BPASmartClient.Business/BPASmartClient.Business.csproj b/BPASmartClient.Business/BPASmartClient.Business.csproj index e150ff8b..a6ae8690 100644 --- a/BPASmartClient.Business/BPASmartClient.Business.csproj +++ b/BPASmartClient.Business/BPASmartClient.Business.csproj @@ -8,7 +8,7 @@ - + diff --git a/BPASmartClient.Business/Plugin/OrderProxy.cs b/BPASmartClient.Business/Plugin/OrderProxy.cs index 3622772c..5dcc1e6c 100644 --- a/BPASmartClient.Business/Plugin/OrderProxy.cs +++ b/BPASmartClient.Business/Plugin/OrderProxy.cs @@ -140,7 +140,8 @@ namespace BPASmartClient.Business { CookingStatus = orderStatusChangedEvent.Status, SuborderId = orderStatusChangedEvent.SubOrderId, - GoodName = orderStatusChangedEvent.GoodName + GoodName = orderStatusChangedEvent.GoodName, + SortNum = orderStatusChangedEvent.SortNum }; #region API 订单状态修改 diff --git a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj index f2117223..a0cc2d58 100644 --- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj +++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj @@ -204,7 +204,7 @@ - + diff --git a/BPASmartClient.Device/BPASmartClient.Device.csproj b/BPASmartClient.Device/BPASmartClient.Device.csproj index ce865d26..2909a1c3 100644 --- a/BPASmartClient.Device/BPASmartClient.Device.csproj +++ b/BPASmartClient.Device/BPASmartClient.Device.csproj @@ -7,7 +7,7 @@ - + diff --git a/BPASmartClient.Device/BaseDevice.cs b/BPASmartClient.Device/BaseDevice.cs index 6cbd9d5f..8a1cb1b7 100644 --- a/BPASmartClient.Device/BaseDevice.cs +++ b/BPASmartClient.Device/BaseDevice.cs @@ -208,20 +208,10 @@ namespace BPASmartClient.Device { InterfaceStatus = item.GetValue(this) as IStatus; GetMonitorData(InterfaceStatus); - //ThreadManage.GetInstance().StopTask($"{item.Name}:{DeviceId}", new Action(() => - // { - //ThreadManage.GetInstance().StartLong(new Action(() => - //{ - // UpdateValue(InterfaceStatus); - // Thread.Sleep(1000); - //}), $"GvlStatusMonitor:{DeviceId}"); - //})); } else if (faces.Name == "IAlarm") { InterfaceAlarm = item.GetValue(this) as IAlarm; - //IAlarm alarm = item.GetValue(this) as IAlarm; - //AlarmHelper alarmHelper = new AlarmHelper(); alarmHelper.AddAction += new Action((s) => { var res = alarmHelper.Alarms.FirstOrDefault(p => p.Info == s); diff --git a/BPASmartClient.Model/BPASmartClient.Model.csproj b/BPASmartClient.Model/BPASmartClient.Model.csproj index f10dc37c..35401612 100644 --- a/BPASmartClient.Model/BPASmartClient.Model.csproj +++ b/BPASmartClient.Model/BPASmartClient.Model.csproj @@ -15,7 +15,7 @@ - + diff --git a/BPASmartClient.Model/订单/OrderStatusChangedEvent.cs b/BPASmartClient.Model/订单/OrderStatusChangedEvent.cs index 7f9045ce..87d1cbaa 100644 --- a/BPASmartClient.Model/订单/OrderStatusChangedEvent.cs +++ b/BPASmartClient.Model/订单/OrderStatusChangedEvent.cs @@ -25,5 +25,10 @@ namespace BPASmartClient.Model /// 商品名称 /// public string GoodName { get; set; } + + /// + /// 订单排序号 + /// + public string SortNum { get; set; } } } diff --git a/BPASmartClient.MorkS/Alarm.cs b/BPASmartClient.MorkS/Alarm.cs index 6655f53d..eee6bce7 100644 --- a/BPASmartClient.MorkS/Alarm.cs +++ b/BPASmartClient.MorkS/Alarm.cs @@ -98,11 +98,11 @@ namespace BPASmartClient.MorkS public bool DeviceEstop { get; set; } /// - /// 机器人初始化失败 + /// PLC电池电压低 /// PLC ---> M231.3 /// ModbusTcp --> 1583 /// - [Alarm("机器人初始化失败")] + [Alarm("PLC电池电压低")] public bool RobotInitError { get; set; } /// diff --git a/BPASmartClient.MorkS/Control_Morks.cs b/BPASmartClient.MorkS/Control_Morks.cs index 04cbf7e3..f81da3fe 100644 --- a/BPASmartClient.MorkS/Control_Morks.cs +++ b/BPASmartClient.MorkS/Control_Morks.cs @@ -100,8 +100,13 @@ namespace BPASmartClient.MorkS { var res = mORKS.doOrderEvents.FirstOrDefault(p => p.MorkOrder.SuborderId == subid); string goodName = string.Empty; - if (res != null) goodName = res.MorkOrder.GoodsName; - EventBus.EventBus.GetInstance().Publish(new OrderStatusChangedEvent() { GoodName = goodName, Status = oRDER_STATUS, SubOrderId = subid, deviceClientType = DeviceType }); + string SortNum = string.Empty; + if (res != null) + { + goodName = res.MorkOrder.GoodsName; + SortNum = res.MorkOrder.SortNum.ToString(); + } + EventBus.EventBus.GetInstance().Publish(new OrderStatusChangedEvent() { SortNum = SortNum, GoodName = goodName, Status = oRDER_STATUS, SubOrderId = subid, deviceClientType = DeviceType }); } private void GetStatus(string key, Action action) @@ -235,6 +240,18 @@ namespace BPASmartClient.MorkS mORKS.doOrderEvents.Add(order); if (order.MorkOrder.GoodBatchings == null) return; OrderCount++; + + new OrderStatusChangedEvent() + { + DeviceId = DeviceId, + SubOrderId = order.MorkOrder.SuborderId, + Status = ORDER_STATUS.WAIT, + GoodName = order.MorkOrder.GoodsName, + SortNum = order.MorkOrder.SortNum.ToString(), + deviceClientType = DeviceType + }.Publish(); + + DeviceProcessLogShow($"接收到{OrderCount}次订单"); foreach (var item in order.MorkOrder.GoodBatchings) { diff --git a/BPASmartClient/App.config b/BPASmartClient/App.config index 7dae1457..974384aa 100644 --- a/BPASmartClient/App.config +++ b/BPASmartClient/App.config @@ -3,19 +3,18 @@ - + + + --> -