Commit 15d33974 LN

预扫码重复时不使用

1 个父辈 e7e70cbb
......@@ -1190,15 +1190,34 @@ namespace OnlineStore.DeviceLibrary
InLog("料盘移栽" + MoveInfo.SLog + ": ,预扫码");
//还有料盘,直接扫码
NextCodeList = new List<string>();
List<string> bijiaoList = new List<string>(LastCodeList);
try
{
Task<List<string>> scanTask = Task.Factory.StartNew(delegate
{
NextCodeList = CodeManager.CameraScan(Config.GetCameraList(), Name);
if (NextCodeList.Count <= 0)
//if (NextCodeList.Count <= 0)
//{
// NextCodeList = CodeManager.CameraScan(Config.GetCameraList(), Name);
//}
bool isCanUse = true;
//判断是否可用
foreach (string nC in NextCodeList)
{
NextCodeList = CodeManager.CameraScan(Config.GetCameraList(), Name);
foreach (string n in bijiaoList)
{
if (nC.Length > 15 && nC.Equals(n))
{
LogUtil.error(Name + "预扫码结果【" + nC + "】与上个条码【" + n + "】重复,预扫码不可用");
isCanUse = false;
break;
}
}
}
if (!isCanUse)
{
NextCodeList = new List<string>();
}
return NextCodeList;
});
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!