Commit 0b5d64bf 张东亮

扫码检查是否是CB开头

1 个父辈 f4e69dc4
......@@ -3,6 +3,7 @@ using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
......@@ -129,10 +130,18 @@ namespace DeviceLibrary
}
else
{
var codes = x.Select((a) => a.CodeStr);
if (codes.Any(s => !string.IsNullOrEmpty(s) && s.ToUpper().StartsWith("CB")))
{
MoveInfo.NextMoveStep(MoveStep.In05);
Lift.LiftDown(MoveInfo);
MoveInfo.log($"放下入料阻挡");
}
else
{
Msg.add($"扫到的料箱条码无CB开头,请确认:{string.Join(",", codes)}", MsgLevel.critical);
}
}
}
else if (MoveInfo.IsTimeOut(10))
......@@ -228,7 +237,8 @@ namespace DeviceLibrary
else if (MoveInfo.IsTimeOut(15))
{
isScanErrorTimes++;
if (isScanErrorTimes < 3) {
if (isScanErrorTimes < 3)
{
MoveInfo.NextMoveStep(MoveStep.In03);
}
else
......@@ -281,7 +291,7 @@ namespace DeviceLibrary
MoveInfo.NextMoveStep(MoveStep.InNG3);
Line.LineStop("work");
MoveInfo.log($"料箱抵达出口");
if (isScanErrorTimes>2)
if (isScanErrorTimes > 2)
Msg.add("入库周转箱扫码失败,请确认料箱方向后重试", MsgLevel.critical);
else
Msg.add("入库周转箱超重,已退出,请处理", MsgLevel.critical);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!