Commit d2cf5d4f LN

根据接口判断是否盘点料

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