Commit ba4b5bf5 LN

入库验证失败问题修改

1 个父辈 f4ee11c6
...@@ -407,10 +407,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -407,10 +407,13 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error(Name + "托盘号【"+currTrayNum+"】入库信息【"+cc.ToStr()+ "】料仓未验证成功,不拦截托盘,更新此托盘为NG,从waitInStoreList中删除"); LogUtil.error(Name + "托盘号【"+currTrayNum+"】入库信息【"+cc.ToStr()+ "】料仓未验证成功,重新发送验证消息");
TrayManager.UpdateInStoreNG(currTrayNum, true,"Box验证入库失败"); LineServer.CheckInStorePos(DeviceID, cc);
needRemove = true; //TrayManager.UpdateInStoreNG(currTrayNum, true,"Box验证入库失败");
break; //needRemove = true;
//break;
return true;
} }
} }
index++; index++;
...@@ -499,16 +502,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -499,16 +502,28 @@ namespace OnlineStore.DeviceLibrary
} }
if (reIndex >= 0) if (reIndex >= 0)
{ {
waitInStoreList.RemoveAt(reIndex);
if (!LineServer.BoxCanInStore(DeviceID)) if (!LineServer.BoxCanInStore(DeviceID))
{ {
LogInfo( "*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先放托盘通过"); LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先放托盘通过");
return false ; return false;
} }
else else
{ {
LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】 ,开始入库移栽"); //判断是否验证成功,如果验证失败,不入库
return true; if (LineServer.RightInPosId(DeviceID, currCode.PosId))
{
waitInStoreList.RemoveAt(reIndex);
LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】 ,开始入库移栽");
return true;
}
else
{
LogUtil.error(Name + "托盘号【" + currTrayNum + "】入库信息【" + currCode.ToStr() + "】料仓未验证成功,不拦截托盘,更新此托盘为NG,从waitInStoreList中删除");
TrayManager.UpdateInStoreNG(currTrayNum, true, "Box验证入库失败");
waitInStoreList.RemoveAt(reIndex);
return false;
}
} }
} }
} }
......
...@@ -3,6 +3,7 @@ using System; ...@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
...@@ -83,9 +84,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -83,9 +84,9 @@ namespace OnlineStore.DeviceLibrary
DateTime startTime = DateTime.Now; DateTime startTime = DateTime.Now;
LogUtil.info(deviceName + "托盘【" + trayNum + "】 条码【 " + codeStr + "】料串【" + rfid + "】,获取入库库位:"); LogUtil.info(deviceName + "托盘【" + trayNum + "】 条码【 " + codeStr + "】料串【" + rfid + "】,获取入库库位:");
string resultStr = HttpHelper.Post(server, "",10000); string resultStr = HttpHelper.Post(server, "", 10000);
LogUtil.info(deviceName + "CodeReceived "+FormUtil.GetSpanStr(DateTime.Now-startTime)+" 【" + server + "】【" + resultStr + "】"); LogUtil.info(deviceName + "CodeReceived " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
//{"result":"0","msg":"","pos":"11#AC1_18_4_28","barcode":"R506072019102200414","cid":"line-ac-11"} //{"result":"0","msg":"","pos":"11#AC1_18_4_28","barcode":"R506072019102200414","cid":"line-ac-11"}
LineOperation serverResult = JsonHelper.DeserializeJsonToObject<LineOperation>(resultStr); LineOperation serverResult = JsonHelper.DeserializeJsonToObject<LineOperation>(resultStr);
if (serverResult == null) if (serverResult == null)
...@@ -133,6 +134,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -133,6 +134,16 @@ namespace OnlineStore.DeviceLibrary
{ {
LineServer.CheckInStorePos(storeId, param); LineServer.CheckInStorePos(storeId, param);
} }
else
{
//等待3秒后重发验证
Task.Factory.StartNew(delegate
{
LogUtil.error(moveEquip.Name + " 入库命令: " + param.ToStr() + " 给料仓发送验证失败,等待3秒后重发 ");
Thread.Sleep(3000);
LineServer.CheckInStorePos(storeId, param);
});
}
lock (moveEquip.waitInListLock) lock (moveEquip.waitInListLock)
{ {
//如果当前正在出入库中,需要记录下来,等待空闲时执行 //如果当前正在出入库中,需要记录下来,等待空闲时执行
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!