Commit d2cf5d4f LN

根据接口判断是否盘点料

1 个父辈 77a18038
......@@ -187,7 +187,7 @@ namespace OnlineStore.DeviceLibrary
{
if (isLog)
{
LogUtil.info(" AGV " + ServerIp + " Log : " + s);
LogUtil.debug(" AGV " + ServerIp + " Log : " + s);
}
}
catch (Exception ex)
......
......@@ -414,7 +414,7 @@ namespace OnlineStore.DeviceLibrary
UpdateTrayNum();
MoveInfo.NextMoveStep(LineMoveStep.HY05_TrayCheck);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000));
//先判断是否需要到出料线,在判断是否需要横移
if (TrayNeedToOutLine(currTrayNum))
......@@ -1051,12 +1051,16 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveParam = param;
return true;
}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.IsCheck() && this.DeviceID.Equals(216))
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.urgentReel && this.DeviceID.Equals(216))
{
//盘点料到NG箱
LogInfo(" C1->出料线:盘点料" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
bool needToBielt = SServerManager.canReelToBelt(Name, trayInfo.InoutPar.WareCode,false);
if (needToBielt)
{
//盘点料到NG箱
LogInfo($" C1->出料线,canReelToBelt={needToBielt} ,:盘点料" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
}
//else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.urgentReel && this.DeviceID.Equals(216))
//{
......
......@@ -447,7 +447,7 @@ namespace OnlineStore.DeviceLibrary
//MoveInfo.MoveParam = inoup;
return true;
}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.IsCheck() && this.DeviceID.Equals(216))
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel && this.DeviceID.Equals(216))
{
//盘点料到NG箱
LogInfo(" 盘点料->NG箱" + "" + inoup.ToStr());
......
......@@ -621,7 +621,7 @@ namespace OnlineStore.DeviceLibrary
}
// 流水线料盘移动到皮带线时进行判断: 地址: /rest/api/qisda/device/canReelToBelt 参数:barcode: 料盘条码
private static string Addr_canReelToBelt = "/rest/api/qisda/device/canReelToBelt";
public static bool canReelToBelt(string deviceName, string barcode)
public static bool canReelToBelt(string deviceName, string barcode,bool defaultPut=true)
{
// 返回: // { "code":0,"msg":"ok","data":true}
// code: 0为正常,其他为异常,(未传参数, 未找到有效条码, 多个有效条码)
......@@ -657,7 +657,7 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error(deviceName + " " + ex.ToString());
}
return true;
return defaultPut;
}
}
public class ReturnData
......
......@@ -71,14 +71,7 @@ namespace OnlineStore.DeviceLibrary
}
public string ToShortStr()
{
if (urgentReel && IsCheck())
{
return $" [{ rfid }][{ WareCode }] [{ PosId }] [{ PlateW }x{ PlateH }] [盘点料]";
}
else
{
return $" [{ rfid }][{ WareCode }] [{ PosId }] [{ PlateW }x{ PlateH }] {(urgentReel ? "[紧急料]" : "")} {(cutReel ? "[分盘料]" : "")}";
}
return $" [{ rfid }][{ WareCode }] [{ PosId }] [{ PlateW }x{ PlateH }] {(urgentReel ? "[紧急料]" : "")} {(cutReel ? "[分盘料]" : "")}";
}
/// <summary>
/// 根据PosId获取对应的料仓ID,若PosId=="",返回-1
......@@ -124,28 +117,28 @@ namespace OnlineStore.DeviceLibrary
}
return -1;
}
/// <summary>
/// 判断是否是盘点料
/// </summary>
/// <returns></returns>
public bool IsCheck()
{
try
{
if (urgentReel)
{
string[] array = rfid.Trim().Split('-');
if (array != null && array.Length.Equals(2) && array[0].Length >= 2)
{
return true;
}
}
}
catch (Exception ex)
{
}
return false;
}
///// <summary>
///// 判断是否是盘点料
///// </summary>
///// <returns></returns>
//public bool IsCheck()
//{
// try
// {
// if (urgentReel)
// {
// string[] array = rfid.Trim().Split('-');
// if (array != null && array.Length.Equals(2) && array[0].Length >= 2)
// {
// return true;
// }
// }
// }
// catch (Exception ex)
// {
// }
// return false;
//}
/// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上
/// </summary>
......
......@@ -38,14 +38,7 @@ namespace OnlineStore.DeviceLibrary
string outType = "出料"+ ngstr + ":";
if (inoutPar.urgentReel)
{
if (inoutPar.IsCheck())
{
outType = "盘点料" + ngstr + ":";
}
else
{
outType = "紧急料" + ngstr + ":";
}
outType = "紧急料" + ngstr + ":";
}else if (inoutPar.cutReel)
{
outType = "分盘料" + ngstr + ":";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!