diff --git a/Aucma.Core.ProductOffLine/Business/MvCodeHelper.cs b/Aucma.Core.ProductOffLine/Business/MvCodeHelper.cs index 28179fcd..67e7e2db 100644 --- a/Aucma.Core.ProductOffLine/Business/MvCodeHelper.cs +++ b/Aucma.Core.ProductOffLine/Business/MvCodeHelper.cs @@ -59,7 +59,7 @@ namespace Aucma.Core.ProductOffLine.Business // Console.WriteLine("CodeNum[" + Convert.ToString(stBcrResult.nCodeNum) + "]"); if (stBcrResult.nCodeNum == 0) { - Console.WriteLine("shell--->No Read 处理"); + Console.WriteLine("外侧--->No Read 处理"); } 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); 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); - // 业务处理 + 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) + "]"); if (stBcrResult.nCodeNum == 0) { - Console.WriteLine("liner--->No Read 处理"); + Console.WriteLine("内侧--->No Read 处理"); } 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); 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); + } + else + { + Console.WriteLine("内侧--->No Read 处理"); + } + + } }