|
|
@@ -17,6 +17,7 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
private Alarm alarm = new Alarm(); |
|
|
|
public override void DoMain() |
|
|
|
{ |
|
|
|
base.IsConnected = false; |
|
|
|
base.stateAction = o => |
|
|
|
{ |
|
|
|
if (o) |
|
|
@@ -231,7 +232,7 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
|
|
|
|
private void TempOrderChange(string subid, ORDER_STATUS oRDER_STATUS, Action complete) |
|
|
|
{ |
|
|
|
if (mORKS.doOrderEvents!=null&&mORKS.doOrderEvents.Count>0) |
|
|
|
if (mORKS.doOrderEvents!=null&&mORKS.doOrderEvents.Count>0&&!string.IsNullOrEmpty(subid)) |
|
|
|
{ |
|
|
|
var res = mORKS.doOrderEvents.FirstOrDefault(p => p.MorkOrder.SuborderId == subid); |
|
|
|
string goodName = string.Empty; |
|
|
@@ -605,6 +606,8 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
/// <summary>数据解析</summary> |
|
|
|
private void DataParse() |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
EventBus.GetInstance().Subscribe<DoOrderEvent>(DeviceId, delegate (IEvent @event, EventCallBackHandle callBackHandle) |
|
|
|
{ |
|
|
|
if (@event == null) |
|
|
@@ -671,6 +674,57 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
#region 添加网络订单至本地展示 |
|
|
|
//ActionManage.GetInstance.Register(new Action<object[]>((o) => |
|
|
|
//{ |
|
|
|
// if (o is object[] obj) |
|
|
|
// { |
|
|
|
// if (o.Length == 2) |
|
|
|
// { |
|
|
|
// if (o[0] is MorkOrderPush morkOrderpush && o[1] is IDevice device) |
|
|
|
// { |
|
|
|
// ObservableCollection<MorkOrder> observableCollection = new ObservableCollection<MorkOrder>(); |
|
|
|
// MorkOrder morkOrder = new MorkOrder() |
|
|
|
// { |
|
|
|
// OrderPush = morkOrderpush, |
|
|
|
// OrderStatus = ORDER_STATUS.WAIT, |
|
|
|
// StartDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), |
|
|
|
// FoodMenuModel = new FoodMenuModel() { } |
|
|
|
// }; |
|
|
|
// FoodMenuViewModel.orderStatusLists.Add(morkOrder); |
|
|
|
// observableCollection.Add(morkOrder); |
|
|
|
// Application.Current?.Dispatcher.BeginInvoke((Action)delegate |
|
|
|
// { |
|
|
|
// int index = Array.FindIndex(Json<KeepDataBase>.Data.orderLists.ToArray(), p => p.DeviceId == device.DeviceId.ToString()); |
|
|
|
// if (index < 0) |
|
|
|
// { |
|
|
|
// Json<KeepDataBase>.Data.orderLists.Add(new OrderData() |
|
|
|
// { |
|
|
|
// DeviceId = device.DeviceId.ToString(), |
|
|
|
// IsAllSelect = true, |
|
|
|
// morkOrderPushes = observableCollection, |
|
|
|
|
|
|
|
// }); |
|
|
|
// } |
|
|
|
// else |
|
|
|
// { |
|
|
|
// Json<KeepDataBase>.Data.orderLists.ElementAt(index).morkOrderPushes.Add(morkOrder); |
|
|
|
// } |
|
|
|
|
|
|
|
// orderStatusLists.Add(new MorkOrder() |
|
|
|
// { |
|
|
|
// OrderPush = morkOrderpush, |
|
|
|
// OrderStatus = ORDER_STATUS.WAIT, |
|
|
|
// StartDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
|
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
//}), "AddOrder"); |
|
|
|
#endregion |
|
|
|
} |
|
|
|
|
|
|
|
public override void MainTask() |
|
|
@@ -679,7 +733,7 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
{ |
|
|
|
NoodOrderCtrl.GetInstance.StateShow("设备正常运行"); |
|
|
|
} |
|
|
|
if (!mORKS.InitComplete&& NoodOrderCtrl.GetInstance.stateInfo == "设备正常运行") |
|
|
|
if (!mORKS.InitComplete) |
|
|
|
{ |
|
|
|
NoodOrderCtrl.GetInstance.StateShow("设备未初始化"); |
|
|
|
} |
|
|
|