|
|
@@ -411,6 +411,7 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
OrderChange(order.MorkOrder.SuborderId, ORDER_STATUS.WAIT); |
|
|
|
DeviceProcessLogShow($"接收到{OrderCount}次订单,订单ID:{order.MorkOrder.SuborderId}"); |
|
|
|
mORKS.HistorySuborderId.Add(order.MorkOrder.SuborderId); |
|
|
|
mORKS.IDSortNums.TryAdd(order.MorkOrder.SuborderId, order.MorkOrder.SortNum); |
|
|
|
foreach (var item in order.MorkOrder.GoodBatchings) |
|
|
|
{ |
|
|
|
var res = orderMaterialDelivery?.BatchingInfo?.FirstOrDefault(p => p.BatchingId == item.BatchingId); |
|
|
@@ -479,12 +480,17 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
{ |
|
|
|
if (orderLocInfo.Loc >= 10 && orderLocInfo.Loc <= 11) |
|
|
|
{ |
|
|
|
mORKS.TakeBowlId = orderLocInfo.SuborderId; |
|
|
|
//mORKS.TakeBowlId = orderLocInfo.SuborderId; |
|
|
|
mORKS.TakeBowName = orderLocInfo.GoodName; |
|
|
|
mORKS.TakeBowSortNum = orderLocInfo.SortNum; |
|
|
|
TakeBowlControl(orderLocInfo.Loc); |
|
|
|
OrderChange(mORKS.TakeBowlId, ORDER_STATUS.COOKING); |
|
|
|
DeviceProcessLogShow($"订单【{mORKS.TakeBowlId}】执行取碗控制,位置:[{orderLocInfo.Loc}]"); |
|
|
|
|
|
|
|
//OrderChange(mORKS.TakeBowlId, ORDER_STATUS.COOKING); |
|
|
|
OrderChange(orderLocInfo.SuborderId, ORDER_STATUS.COOKING); |
|
|
|
|
|
|
|
//DeviceProcessLogShow($"订单【{mORKS.TakeBowlId}】执行取碗控制,位置:[{orderLocInfo.Loc}]"); |
|
|
|
DeviceProcessLogShow($"订单【{orderLocInfo.SuborderId}】执行取碗控制,位置:[{orderLocInfo.Loc}]"); |
|
|
|
|
|
|
|
mORKS.TakeBowlInterlock = true; |
|
|
|
} |
|
|
|
} |
|
|
@@ -661,7 +667,6 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
DeviceProcessLogShow($"转盘位置[{mORKS.CurrentFeedbackLoc}]:写入煮面时间{x.Minute}分{x.Second}秒。"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
mORKS.CurrentLoc = 0; |
|
|
|
mORKS.CookNodelId[loc] = orderLocInfo.SuborderId; |
|
|
|
mORKS.NoodleCookerStatus[loc] = true; |
|
|
@@ -682,27 +687,49 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
/// </summary> |
|
|
|
private void OutNoodleTask() |
|
|
|
{ |
|
|
|
if (mORKS.AllowInvertedFace && mORKS.RobotTaskInterlock && !mORKS.TakeNoodleInterlock && mORKS.RobotStatus) |
|
|
|
{ |
|
|
|
int loc = Array.FindIndex(mORKS.CookNodelId, p => p == mORKS.IngredientsCompleteId && p.Length > 0); |
|
|
|
if (loc >= 0 && loc <= 5) |
|
|
|
{ |
|
|
|
if (mORKS.CookNoodleCom[loc]) |
|
|
|
{ |
|
|
|
SetTakeNoodleLoc((ushort)(loc + 1)); |
|
|
|
mORKS.NoodleCookerStatus[loc] = false; |
|
|
|
WriteData($"VW260", (ushort)0);//设置出汤时间 |
|
|
|
OrderChange(mORKS.IngredientsCompleteId, ORDER_STATUS.COMPLETED_COOK); |
|
|
|
DeviceProcessLogShow($"订单【{mORKS.IngredientsCompleteId}】制作完成"); |
|
|
|
mORKS.CookCompleteFlatBit = true; |
|
|
|
mORKS.OutMealId = mORKS.IngredientsCompleteId; |
|
|
|
mORKS.OutMealName = mORKS.IngredientsCompleteName; |
|
|
|
mORKS.OutMealSortNum = mORKS.IngredientsCompleteSortNum; |
|
|
|
mORKS.IngredientsCompleteId = string.Empty; |
|
|
|
mORKS.CookNodelId[loc] = string.Empty; |
|
|
|
DeviceProcessLogShow($"{loc + 1} 号位置出餐控制,订单ID:{mORKS.OutMealId}"); |
|
|
|
mORKS.CookNoodleCom[loc] = false; |
|
|
|
} |
|
|
|
if (mORKS.AllowInvertedFace && mORKS.RobotTaskInterlock && !mORKS.RobotOutDinnigLock && !mORKS.TakeNoodleInterlock && mORKS.RobotStatus) |
|
|
|
{ |
|
|
|
#region 修改之前的代码 |
|
|
|
//int loc = Array.FindIndex(mORKS.CookNodelId, p => p == mORKS.IngredientsCompleteId && p.Length > 0); |
|
|
|
//if (loc >= 0 && loc <= 5) |
|
|
|
//{ |
|
|
|
// if (mORKS.CookNoodleCom[loc]) |
|
|
|
// { |
|
|
|
// SetTakeNoodleLoc((ushort)(loc + 1)); |
|
|
|
// mORKS.NoodleCookerStatus[loc] = false; |
|
|
|
// WriteData($"VW260", (ushort)0);//设置出汤时间 |
|
|
|
// OrderChange(mORKS.IngredientsCompleteId, ORDER_STATUS.COMPLETED_COOK); |
|
|
|
// DeviceProcessLogShow($"订单【{mORKS.IngredientsCompleteId}】制作完成"); |
|
|
|
// mORKS.CookCompleteFlatBit = true; |
|
|
|
// mORKS.OutMealId = mORKS.IngredientsCompleteId; |
|
|
|
// mORKS.OutMealName = mORKS.IngredientsCompleteName; |
|
|
|
// mORKS.OutMealSortNum = mORKS.IngredientsCompleteSortNum; |
|
|
|
// mORKS.IngredientsCompleteId = string.Empty; |
|
|
|
// mORKS.CookNodelId[loc] = string.Empty; |
|
|
|
// DeviceProcessLogShow($"{loc + 1} 号位置出餐控制,订单ID:{mORKS.OutMealId}"); |
|
|
|
// mORKS.CookNoodleCom[loc] = false; |
|
|
|
// } |
|
|
|
//} |
|
|
|
#endregion |
|
|
|
|
|
|
|
for (int loc = 0; loc < mORKS.CookNodelId.Length; loc++) { |
|
|
|
|
|
|
|
if (mORKS.CookNoodleCom[loc]&&!mORKS.RobotOutDinnigLock) { |
|
|
|
SetTakeNoodleLoc((ushort)(loc + 1)); |
|
|
|
mORKS.NoodleCookerStatus[loc] = false; |
|
|
|
WriteData($"VW260", (ushort)0);//设置出汤时间 |
|
|
|
OrderChange(mORKS.CookNodelId[loc], ORDER_STATUS.COMPLETED_COOK); |
|
|
|
DeviceProcessLogShow($"订单【{mORKS.CookNodelId[loc]}】制作完成"); |
|
|
|
mORKS.CookCompleteFlatBit = true; |
|
|
|
mORKS.OutMealId = mORKS.CookNodelId[loc]; |
|
|
|
mORKS.OutMealName = mORKS.IngredientsCompleteName; |
|
|
|
mORKS.OutMealSortNum = mORKS.IngredientsCompleteSortNum; |
|
|
|
mORKS.IngredientsCompleteId = string.Empty; |
|
|
|
mORKS.CookNodelId[loc] = string.Empty; |
|
|
|
DeviceProcessLogShow($"{loc + 1} 号位置出餐控制,订单ID:{mORKS.OutMealId}"); |
|
|
|
mORKS.CookNoodleCom[loc] = false; |
|
|
|
mORKS.RobotOutDinnigLock = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@@ -715,14 +742,16 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
//允许倒面信号检测 |
|
|
|
if (RTrig.GetInstance("AllowFallNoodle").Start(mORKS.AllowInvertedFace)) |
|
|
|
{ |
|
|
|
mORKS.IngredientsCompleteId = mORKS.TakeBowlId; |
|
|
|
//mORKS.IngredientsCompleteId = mORKS.TakeBowlId; |
|
|
|
mORKS.IngredientsCompleteName = mORKS.TakeBowName; |
|
|
|
mORKS.IngredientsCompleteSortNum = mORKS.TakeBowSortNum; |
|
|
|
mORKS.TakeBowSortNum = 0; |
|
|
|
mORKS.TakeBowlId = string.Empty; |
|
|
|
mORKS.TakeBowName = string.Empty; |
|
|
|
DeviceProcessLogShow($"碗到位,允许到面,{mORKS.IngredientsCompleteId}"); |
|
|
|
//DeviceProcessLogShow($"碗到位,允许到面,{mORKS.IngredientsCompleteId}"); |
|
|
|
DeviceProcessLogShow($"碗到位,允许倒面。"); |
|
|
|
mORKS.TakeBowlInterlock = false; |
|
|
|
mORKS.RobotOutDinnigLock = false; |
|
|
|
} |
|
|
|
|
|
|
|
//取餐完成逻辑处理 |
|
|
@@ -731,6 +760,9 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
OrderChange(mORKS.OutMealId, ORDER_STATUS.COMPLETED_TAKE); |
|
|
|
DeviceProcessLogShow($"订单【{mORKS.OutMealId}】取餐完成"); |
|
|
|
WriteData("M10.1", false); |
|
|
|
int takeDinningNum; |
|
|
|
mORKS.IDSortNums.TryRemove(mORKS.OutMealId, out takeDinningNum); |
|
|
|
mORKS.OutMealSortNum = takeDinningNum; |
|
|
|
DeviceProcessLogShow($"出餐订单序号【{mORKS.OutMealSortNum}】"); |
|
|
|
VoiceAPI.Speak(mORKS.OutMealSortNum.ToString()); |
|
|
|
//DeviceProcessLogShow($"叫号系统通知主题【MORKS/VoiceCall/{DeviceId}】"); |
|
|
@@ -759,7 +791,8 @@ namespace BPASmartClient.MorkSUpgradedVer |
|
|
|
|
|
|
|
mORKS.PriorityJudgment = Delay.GetInstance("取餐优先级判断").Start(mORKS.TurntableLocLists.Count > 0 && !mORKS.TurntableLowPosition, 4); |
|
|
|
//mORKS.RobotTaskInterlock = OutMealRequstCount > 0 && mORKS.AllowInvertedFace && (mlCount >= 2 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment); |
|
|
|
mORKS.RobotTaskInterlock = isok && mORKS.AllowInvertedFace && (mlCount >= 2 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment); |
|
|
|
//mORKS.RobotTaskInterlock = isok && mORKS.AllowInvertedFace && (mlCount >= 2 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment); |
|
|
|
mORKS.RobotTaskInterlock = mORKS.AllowInvertedFace && (mlCount >= 6 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|