|
|
@@ -60,7 +60,10 @@ namespace HBLConsole.MORKIC |
|
|
|
//构建所有商品物料信息 |
|
|
|
batchings = PolymerBatching.BuildAll(); |
|
|
|
|
|
|
|
System.Configuration.Configuration config = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.None); |
|
|
|
EventBus.GetInstance().Subscribe<IceCreamEndCook>(IceCreamEndCookHandle); |
|
|
|
EventBus.GetInstance().Subscribe<CoffeEndCook>(CoffeEndCookHandle); |
|
|
|
|
|
|
|
Configuration config = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.None); |
|
|
|
//一系列外围基础配置 |
|
|
|
var com_Coffee = config.AppSettings.Settings["COM_Coffee"].Value; |
|
|
|
var baud_Coffee = config.AppSettings.Settings["BAUD_Coffee"].Value; |
|
|
@@ -81,6 +84,7 @@ namespace HBLConsole.MORKIC |
|
|
|
ReadData(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void DataParse<T>(T order) |
|
|
|
{ |
|
|
@@ -138,6 +142,8 @@ namespace HBLConsole.MORKIC |
|
|
|
return GOODS_TYPE.NEITHER; |
|
|
|
} |
|
|
|
|
|
|
|
private AutoResetEvent are=new AutoResetEvent(false); |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 做咖啡 |
|
|
|
/// </summary> |
|
|
@@ -148,6 +154,7 @@ namespace HBLConsole.MORKIC |
|
|
|
//todo:先调用机器人 |
|
|
|
LebaiHelper.GetInstance.Scene(10002); |
|
|
|
new MakeCoffeeEvent() { DrinkCode = (DrCoffeeDrinksCode)int.Parse(mainMaterialLoc) }.Publish(); |
|
|
|
are.WaitOne(100 * 90); |
|
|
|
//订单状态改变:完成 |
|
|
|
SimpleFactory.GetInstance.OrderChanged(subOrderId, BPA.Message.Enum.ORDER_STATUS.COMPLETED_COOK); |
|
|
|
} |
|
|
@@ -162,10 +169,23 @@ namespace HBLConsole.MORKIC |
|
|
|
//todo:先调用机器人 |
|
|
|
LebaiHelper.GetInstance.Scene(10001); |
|
|
|
new DischargeEvent().Publish(); |
|
|
|
//冰淇淋没有模式切换,强制等待10s |
|
|
|
Thread.Sleep(10000); |
|
|
|
//are.WaitOne(100 * 90); |
|
|
|
//订单状态改变:完成 |
|
|
|
SimpleFactory.GetInstance.OrderChanged(subOrderId, BPA.Message.Enum.ORDER_STATUS.COMPLETED_COOK); |
|
|
|
} |
|
|
|
|
|
|
|
private void CoffeEndCookHandle(IEvent @event, EventBus.EventCallBackHandle callBack) |
|
|
|
{ |
|
|
|
are.Set(); |
|
|
|
} |
|
|
|
|
|
|
|
private void IceCreamEndCookHandle(IEvent @event, EventBus.EventCallBackHandle callBack) |
|
|
|
{ |
|
|
|
are.Set(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Main() |
|
|
|
{ |
|
|
|