Commit 0e7d1fb1 LN

入库时有的料在料仓门口不拿走。

1 个父辈 0a57e038
......@@ -331,7 +331,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_10_WaitBox);
LogInfo("入库【" + posId + "】 " + MoveInfo.SLog + ": 物品已移走,更新托盘【" + num + "】为空盘,删除入库任务");
MoveInfo.WaitList.Add(WaitResultInfo.WaitBoxCanReviceTray());
TrayManager.UpdateTrayInfo(num);
TrayManager.UpdateTrayInfo(num);
RemoveInStore(MoveInfo.MoveParam);
InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 物品已移走,顶升气缸1下降");
......@@ -403,20 +403,23 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore);
InLog("入库 " + MoveInfo.SLog + ",通知BOX开始入库,等待3000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
//此时box就可以入库操作了 //触发事件,BOX入库
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
}
else if (MoveInfo.IsStep(LineMoveStep.MI_15_SendPosToStore))
{
MoveInfo.NextMoveStep(LineMoveStep.MI_16_SendEnd);
//判断料仓是否在入库中,如果么有在入库中,需要重新发送入库消息
if (!LineServer.IsInStorePro(DeviceID))
if (!LineServer.IsInStorePro(DeviceID, MoveInfo.MoveParam.PosId))
{
InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓还未开始入库,再次发送starIn命令");
//InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓还未开始入库,再次发送starIn命令");
//LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore);
InLog("入库 " + MoveInfo.SLog + ",再次通知BOX开始入库,等待3000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MI_16_SendEnd);
InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓已开始入库");
}
}
......
......@@ -89,7 +89,7 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
public static bool IsInStorePro(int id)
public static bool IsInStorePro(int id, string posId)
{
BoxInfo box = GetBoxInfo(id);
TimeSpan span = DateTime.Now - box.LastMsgTime;
......@@ -104,6 +104,11 @@ namespace OnlineStore.DeviceLibrary
{
if (status.Equals(LineStatus.InStoreEnd) || status.Equals(LineStatus.InStoreExecute))
{
if (box.WaitInStoreList != null && box.WaitInStoreList.Contains(posId))
{
LogUtil.error("IsInStorePro[" + id + "][" + posId + "],库位还在入库等待列表中,返回false");
return false;
}
return true;
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!