Commit ff4a2e32 张东亮

修复问题:入库时两侧都有料,有一侧料是无法入库的却入库的问题

1 个父辈 e06f51f9
...@@ -51,7 +51,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -51,7 +51,6 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns> /// <returns></returns>
private bool PreInStoreCheck(InOutParam param) private bool PreInStoreCheck(InOutParam param)
{ {
if (!AutoInout.autoNext && !InDoorCheck(param)) if (!AutoInout.autoNext && !InDoorCheck(param))
{ {
if (param == null || param.PosInfo == null) if (param == null || param.PosInfo == null)
...@@ -81,7 +80,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -81,7 +80,37 @@ namespace OnlineStore.DeviceLibrary
} }
return true; return true;
} }
private bool PreInStoreCheck(InOutPosInfo posinfo)
{
if (!AutoInout.autoNext && !InDoorCheck(posinfo))
{
if (posinfo == null)
return false;
SetWarnMsg(Name + $" 启动入库出错,入口料盘无入库信息[barcode={posinfo.barcode},PosSide={posinfo.GetPosSide()}], 任务取消");
SServerManager.cancelPutInTask(Name, posinfo.barcode);
return false;
}
if (!posinfo.CheckPosition())
{
SetWarnMsg(Name + " 启动入库【" + posinfo.ToStr() + "】出错,找不到库位信息");
return false;
}
if (AutoInout.autoNext)
{
LogInfo(" 循环测试入库, 不做入库验证. ");
return true;
}
else
{
if (!ReviceInStoreCMD(posinfo.PosId, posinfo.PlateH, posinfo.PlateW, posinfo.barcode))
{
SetWarnMsg($" 入库验证失败:{posinfo.ToStr()}");
return false;
}
}
return true;
}
/// <summary> /// <summary>
/// 清除入料暂存区的料盘信息 /// 清除入料暂存区的料盘信息
/// </summary> /// </summary>
...@@ -109,7 +138,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -109,7 +138,8 @@ namespace OnlineStore.DeviceLibrary
inOutPosInfo = null; inOutPosInfo = null;
if (CheckASide()) if (CheckASide())
{ {
if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo))) //if (InDoorCheck(new InOutParam(BufferDataManager.BInStoreInfo)))
if(PreInStoreCheck(BufferDataManager.BInStoreInfo))
{ {
inOutPosInfo = BufferDataManager.BInStoreInfo.ToCopy(); inOutPosInfo = BufferDataManager.BInStoreInfo.ToCopy();
return true; return true;
...@@ -117,7 +147,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -117,7 +147,8 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
if (InDoorCheck(new InOutParam(BufferDataManager.AInStoreInfo))) //if (InDoorCheck(new InOutParam(BufferDataManager.AInStoreInfo)))
if (PreInStoreCheck(BufferDataManager.AInStoreInfo))
{ {
inOutPosInfo = BufferDataManager.AInStoreInfo.ToCopy(); inOutPosInfo = BufferDataManager.AInStoreInfo.ToCopy();
return true; return true;
......
...@@ -153,6 +153,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -153,6 +153,12 @@ namespace OnlineStore.DeviceLibrary
return true; return true;
return false; return false;
} }
private bool CheckASide(InOutPosInfo posinfo)
{
if (posinfo.GetPosSide().Equals("A"))
return true;
return false;
}
#region 行走机构 #region 行走机构
/// <summary> /// <summary>
/// 行走机构到待机点P1 /// 行走机构到待机点P1
...@@ -968,6 +974,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -968,6 +974,27 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
private bool InDoorCheck(InOutPosInfo posinfo)
{
if (posinfo == null)
return false;
if (CheckASide(posinfo))
{
if (IOValue(IO_Type.UpperArea_Check_A).Equals(IO_VALUE.HIGH) && posinfo != null)
{
return true;
}
}
else
{
if (IOValue(IO_Type.UpperArea_Check_B).Equals(IO_VALUE.HIGH) && posinfo != null)
{
return true;
}
}
return false;
}
/// <summary> /// <summary>
/// 入料口有料 /// 入料口有料
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!