Commit 0a095af6 LN

入库,清理托盘信息时再清理入库任务。

1 个父辈 197f0d7f
......@@ -312,9 +312,10 @@ namespace OnlineStore.DeviceLibrary
{
int num = MoveInfo.MoveParam.TrayNumber;
MoveInfo.NextMoveStep(LineMoveStep.MI_10_WaitBox);
LogInfo("入库【" + posId + "】 " + MoveInfo.SLog + ": 等待box可入库,更新托盘【" + num + "】为空盘");
LogInfo("入库【" + posId + "】 " + MoveInfo.SLog + ": 等待box可入库,更新托盘【" + num + "】为空盘,清理入库任务 ");
MoveInfo.WaitList.Add(WaitResultInfo.WaitBoxCanReviceTray());
TrayManager.UpdateTrayInfo(num);
RemoveInStore(MoveInfo.MoveParam);
InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 物品已移走,顶升气缸1下降");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
......@@ -546,8 +547,8 @@ namespace OnlineStore.DeviceLibrary
//判断是否验证成功,如果验证失败,不入库
if (LineServer.RightInPosId(DeviceID, currCode.PosId))
{
waitInStoreList.RemoveAt(reIndex);
LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】 ,开始入库移栽");
//waitInStoreList.RemoveAt(reIndex);
LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】 ,开始入库移栽,清理托盘时再删除入库任务");
return true;
}
else
......@@ -566,6 +567,35 @@ namespace OnlineStore.DeviceLibrary
return false;
}
private bool RemoveInStore(InOutParam param)
{
if (waitInStoreList.Count > 0)
{
lock (waitInListLock)
{
//判断是否是自己排队列表中的入库信息
int reIndex = -1;
for (int i = 0; i < waitInStoreList.Count; i++)
{
InOutParam cc = waitInStoreList[i];
//托盘号一致,二维码一致,库位号一致
if (cc.TrayNumber.Equals(param.TrayNumber) && cc.PosId.Equals(param.PosId) && cc.WareCode.Equals(param.WareCode))
{
reIndex = i;
break;
}
}
if (reIndex >= 0)
{
waitInStoreList.RemoveAt(reIndex);
LogInfo("*******料盘已移走,清理入库任务:【" + param.ToStr() + "】");
return true;
}
}
}
return false;
}
#endregion
#region 托盘检测
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!