change-成品下线扫码器添加20位长度过滤

dev
liuwf 11 months ago
parent 1fc9493a7f
commit 13f0eb9738

@ -59,7 +59,7 @@ namespace Aucma.Core.ProductOffLine.Business
// Console.WriteLine("CodeNum[" + Convert.ToString(stBcrResult.nCodeNum) + "]"); // Console.WriteLine("CodeNum[" + Convert.ToString(stBcrResult.nCodeNum) + "]");
if (stBcrResult.nCodeNum == 0) if (stBcrResult.nCodeNum == 0)
{ {
Console.WriteLine("shell--->No Read 处理"); Console.WriteLine("外侧--->No Read 处理");
} }
for (Int32 i = 0; i < stBcrResult.nCodeNum; i++) for (Int32 i = 0; i < stBcrResult.nCodeNum; i++)
{ {
@ -74,8 +74,16 @@ namespace Aucma.Core.ProductOffLine.Business
string strCode = Encoding.GetEncoding("GB2312").GetString(stBcrResult.stBcrInfoEx2[i].chCode); string strCode = Encoding.GetEncoding("GB2312").GetString(stBcrResult.stBcrInfoEx2[i].chCode);
Console.WriteLine("Get CodeNum: " + "CodeNum[" + i.ToString() + "], CodeString[" + strCode.Trim().TrimEnd('\0') + "]"); Console.WriteLine("Get CodeNum: " + "CodeNum[" + i.ToString() + "], CodeString[" + strCode.Trim().TrimEnd('\0') + "]");
// RefreshMaterialCodeStrEvent?.Invoke(strCode.Trim().TrimEnd('\0'), ShellScannerIp); // RefreshMaterialCodeStrEvent?.Invoke(strCode.Trim().TrimEnd('\0'), ShellScannerIp);
RefreshMaterialCodeStrEvent?.Invoke(strCode.Trim().TrimEnd('\0'), ShellScannerIp); if (strCode.Trim().TrimEnd('\0').Length == 20)
// 业务处理 {
RefreshMaterialCodeStrEvent?.Invoke(strCode.Trim().TrimEnd('\0'), ShellScannerIp);
// 业务处理
}
else
{
Console.WriteLine("外侧--->No Read 处理");
}
} }
} }
@ -98,7 +106,7 @@ namespace Aucma.Core.ProductOffLine.Business
// Console.WriteLine("CodeNum[" + Convert.ToString(stBcrResult.nCodeNum) + "]"); // Console.WriteLine("CodeNum[" + Convert.ToString(stBcrResult.nCodeNum) + "]");
if (stBcrResult.nCodeNum == 0) if (stBcrResult.nCodeNum == 0)
{ {
Console.WriteLine("liner--->No Read 处理"); Console.WriteLine("内侧--->No Read 处理");
} }
for (Int32 i = 0; i < stBcrResult.nCodeNum; i++) for (Int32 i = 0; i < stBcrResult.nCodeNum; i++)
{ {
@ -113,8 +121,17 @@ namespace Aucma.Core.ProductOffLine.Business
string strCode = Encoding.GetEncoding("GB2312").GetString(stBcrResult.stBcrInfoEx2[i].chCode); string strCode = Encoding.GetEncoding("GB2312").GetString(stBcrResult.stBcrInfoEx2[i].chCode);
Console.WriteLine("Get CodeNum: " + "CodeNum[" + i.ToString() + "], CodeString[" + strCode.Trim().TrimEnd('\0') + "]"); Console.WriteLine("Get CodeNum: " + "CodeNum[" + i.ToString() + "], CodeString[" + strCode.Trim().TrimEnd('\0') + "]");
// RefreshMaterialCodeStrEvent?.Invoke(strCode.Trim().TrimEnd('\0'), LinerScannerIp); // RefreshMaterialCodeStrEvent?.Invoke(strCode.Trim().TrimEnd('\0'), LinerScannerIp);
// 业务处理 if (strCode.Trim().TrimEnd('\0').Length == 20)
RefreshMaterialCodeStrEvent?.Invoke(strCode.Trim().TrimEnd('\0'), LinerScannerIp); {
// 业务处理
RefreshMaterialCodeStrEvent?.Invoke(strCode.Trim().TrimEnd('\0'), LinerScannerIp);
}
else
{
Console.WriteLine("内侧--->No Read 处理");
}
} }
} }

Loading…
Cancel
Save