|
|
@@ -1,4 +1,4 @@ |
|
|
|
//#define test |
|
|
|
#define test |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.ObjectModel; |
|
|
@@ -148,20 +148,20 @@ namespace HBLConsole.ViewModel |
|
|
|
{ |
|
|
|
while (GeneralConfig.morkOrderPushes.Count > 0) |
|
|
|
{ |
|
|
|
if (GeneralConfig.morkOrderPushes.TryDequeue(out MorkOrderPush morkOrder)) |
|
|
|
{ |
|
|
|
SimpleFactory.GetInstance.OrderChanged(morkOrder.SuborderId, ORDER_STATUS.COOKING); |
|
|
|
MessageLog.GetInstance.Show($"{morkOrder.GoodsName},{ORDER_STATUS.COOKING}"); |
|
|
|
Thread.Sleep(5000); |
|
|
|
|
|
|
|
SimpleFactory.GetInstance.OrderChanged(morkOrder.SuborderId, ORDER_STATUS.COMPLETED_COOK); |
|
|
|
MessageLog.GetInstance.Show($"{morkOrder.GoodsName},{ORDER_STATUS.COMPLETED_COOK}"); |
|
|
|
Thread.Sleep(5000); |
|
|
|
|
|
|
|
SimpleFactory.GetInstance.OrderChanged(morkOrder.SuborderId, ORDER_STATUS.COMPLETED_TAKE); |
|
|
|
MessageLog.GetInstance.Show($"{morkOrder.GoodsName},{ORDER_STATUS.COMPLETED_TAKE}"); |
|
|
|
Thread.Sleep(5000); |
|
|
|
} |
|
|
|
//if (GeneralConfig.morkOrderPushes.TryDequeue(out MorkOrderPush morkOrder)) |
|
|
|
//{ |
|
|
|
// SimpleFactory.GetInstance.OrderChanged(morkOrder.SuborderId, ORDER_STATUS.COOKING); |
|
|
|
// MessageLog.GetInstance.Show($"{morkOrder.GoodsName},{ORDER_STATUS.COOKING}"); |
|
|
|
// Thread.Sleep(5000); |
|
|
|
|
|
|
|
// SimpleFactory.GetInstance.OrderChanged(morkOrder.SuborderId, ORDER_STATUS.COMPLETED_COOK); |
|
|
|
// MessageLog.GetInstance.Show($"{morkOrder.GoodsName},{ORDER_STATUS.COMPLETED_COOK}"); |
|
|
|
// Thread.Sleep(5000); |
|
|
|
|
|
|
|
// SimpleFactory.GetInstance.OrderChanged(morkOrder.SuborderId, ORDER_STATUS.COMPLETED_TAKE); |
|
|
|
// MessageLog.GetInstance.Show($"{morkOrder.GoodsName},{ORDER_STATUS.COMPLETED_TAKE}"); |
|
|
|
// Thread.Sleep(5000); |
|
|
|
//} |
|
|
|
} |
|
|
|
Thread.Sleep(500); |
|
|
|
}), "test"); |
|
|
@@ -176,6 +176,15 @@ namespace HBLConsole.ViewModel |
|
|
|
{ |
|
|
|
Test(); |
|
|
|
|
|
|
|
ActionManage.GetInstance.Register(new Action<object>((o) => |
|
|
|
{ |
|
|
|
if (o == null) return; |
|
|
|
if (o is string id) |
|
|
|
{ |
|
|
|
SimpleFactory.GetInstance.OrderChanged(id, ORDER_STATUS.ABANDONED); |
|
|
|
} |
|
|
|
}), "chargeback"); |
|
|
|
|
|
|
|
//清除订单数据 |
|
|
|
ActionManage.GetInstance.Register(new Action(() => |
|
|
|
{ |
|
|
|