Commit dbdff9b2 LN

入库时若托盘库位不对应,直接清除入库任务。

1 个父辈 35d6abe0
...@@ -777,9 +777,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -777,9 +777,12 @@ namespace OnlineStore.DeviceLibrary
LogInfo(" IsReviceInPosId 正在入库中:" + MoveInfo.MoveParam.ToStr()); LogInfo(" IsReviceInPosId 正在入库中:" + MoveInfo.MoveParam.ToStr());
isReviceInfo = true; isReviceInfo = true;
} }
if (!isReviceInfo && moveEquip.waitInStoreList.Count > 0)
//TODO 如果已经收到同库位的入库任务,
List<InOutParam> inStoreList = new List<InOutParam>(moveEquip.waitInStoreList);
if (!isReviceInfo && inStoreList.Count > 0)
{ {
foreach (InOutParam inout in moveEquip.waitInStoreList) foreach (InOutParam inout in inStoreList)
{ {
if (inout.PosId.Equals(posId) && (!inout.WareCode.Equals(""))) if (inout.PosId.Equals(posId) && (!inout.WareCode.Equals("")))
{ {
......
...@@ -183,8 +183,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -183,8 +183,10 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.MO_58_CylinderDown)) else if (MoveInfo.IsStep(LineMoveStep.MO_58_CylinderDown))
{ {
OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" + MoveInfo.MoveParam.ToStr() + "】"); OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" + MoveInfo.MoveParam.ToStr() + "】");
TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam.Clone());
TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam.Clone());
TrayInfo tray = TrayManager.GetTrayInfo(MoveInfo.MoveParam.TrayNumber);
LogInfo("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘信息 " +tray.ToStr()+ "");
//出库全部完成 //出库全部完成
MoveInfo.NextMoveStep(LineMoveStep.MO_59_CylinderRelax); MoveInfo.NextMoveStep(LineMoveStep.MO_59_CylinderRelax);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
...@@ -482,7 +484,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -482,7 +484,10 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
bool isFull = TrayManager.TrayIsFull(currTrayNum); bool isFull = TrayManager.TrayIsFull(currTrayNum);
if (isFull)
{
return false ;
}
bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_55_CylinderUp) || MoveInfo.MoveStep >= LineMoveStep.MO_57_CylinderAfter; bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_55_CylinderUp) || MoveInfo.MoveStep >= LineMoveStep.MO_57_CylinderAfter;
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && moveOk if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && moveOk
&& (!MoveInfo.IsStep(LineMoveStep.MO_60_CylinderUp))) && (!MoveInfo.IsStep(LineMoveStep.MO_60_CylinderUp)))
...@@ -539,10 +544,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -539,10 +544,7 @@ namespace OnlineStore.DeviceLibrary
InOutParam currCode = null; InOutParam currCode = null;
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum); TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
if (tray.InoutPar.InStoreNg)
{
return false;
}
if (waitInStoreList.Count > 0) if (waitInStoreList.Count > 0)
{ {
lock (waitInListLock) lock (waitInListLock)
...@@ -553,25 +555,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -553,25 +555,17 @@ namespace OnlineStore.DeviceLibrary
{ {
InOutParam cc = waitInStoreList[i]; InOutParam cc = waitInStoreList[i];
if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals(""))) if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals("")))
//if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals("")) && LineServer.RightInPosId(DeviceID, cc.PosId))
{
if (cc.PosId.Equals(tray.InoutPar.PosId))
{ {
reIndex = i; reIndex = i;
currCode = cc; currCode = cc;
SecondMoveInfo.MoveParam = new InOutParam(cc.TrayNumber, cc.WareCode, cc.PosId, cc.PlateH, cc.PlateW, cc.InStoreNg); SecondMoveInfo.MoveParam = new InOutParam(cc.TrayNumber, cc.WareCode, cc.PosId, cc.PlateH, cc.PlateW, cc.InStoreNg);
break; break;
} }
else
{
LogUtil.error(Name + "托盘信息 " + tray.ToStr() + " 与入库任务 " + cc.ToStr() + " 不一致,请检查托盘");
}
}
} }
if (reIndex >= 0) if (reIndex >= 0)
{ {
if (currCode.PosId.Equals(tray.InoutPar.PosId) && tray.InOrOutStore.Equals(1) && tray.InoutPar.InStoreNg.Equals(false))
{
if (!LineServer.BoxCanInStore(DeviceID)) if (!LineServer.BoxCanInStore(DeviceID))
{ {
LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先放托盘通过"); LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先放托盘通过");
...@@ -588,13 +582,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -588,13 +582,20 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error(Name + "托盘号【" + currTrayNum + "】入库信息【" + currCode.ToStr() + "】料仓未验证成功,不拦截托盘,更新此托盘为NG,从waitInStoreList中删除,取消入库任务"); LogUtil.error(Name + "托盘号【" + currTrayNum + "】入库信息【" + currCode.ToStr() + "】料仓未验证成功,更新为入库NG料,从waitInStoreList中删除" + reIndex + ",取消入库任务");
TrayManager.UpdateInStoreNG(currTrayNum, true, "Box验证入库失败"); TrayManager.UpdateInStoreNG(currTrayNum, true, "Box验证入库失败");
waitInStoreList.RemoveAt(reIndex); waitInStoreList.RemoveAt(reIndex);
SServerManager.cancelPutInTask(Name, currCode.WareCode); SServerManager.cancelPutInTask(Name, currCode.WareCode);
return false; return false;
} }
}
}
else
{
LogUtil.error(Name + "托盘信息 " + tray.ToStr() + " 与入库任务 " + currCode.ToStr() + " 不一致,从waitInStoreList中删除" + reIndex + ",取消入库任务");
waitInStoreList.RemoveAt(reIndex);
SServerManager.cancelPutInTask(Name, currCode.WareCode);
return false;
} }
} }
} }
......
...@@ -373,7 +373,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -373,7 +373,7 @@ namespace OnlineStore.DeviceLibrary
string resultStr = HttpHelper.Post(server, ""); string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "cancelPutInTask " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】"); LogUtil.info(deviceName + "cancelPutInTask " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr); CancelData data = JsonHelper.DeserializeJsonToObject<CancelData>(resultStr);
if (data == null) if (data == null)
{ {
...@@ -646,7 +646,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -646,7 +646,16 @@ namespace OnlineStore.DeviceLibrary
public string msg { get; set; } public string msg { get; set; }
public Dictionary<string,string> data { get; set; } public Dictionary<string, string> data { get; set; }
}
public class CancelData
{
//{"code":0,"msg":"ok","data":"7"}
public int code { get; set; }
public string msg { get; set; }
public object data { get; set; }
} }
public class LocStatus public class LocStatus
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!