Commit c90dd4aa LN

扫码问题修改

1 个父辈 322170bb
...@@ -313,21 +313,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -313,21 +313,31 @@ namespace OnlineStore.DeviceLibrary
public static bool HasRightCode(params string[] codes) public static bool HasRightCode(params string[] codes)
{ {
return true;
//640104 * 3331001202 * 210417624 * 600 * 0011 //640104 * 3331001202 * 210417624 * 600 * 0011
//分号分割后长度=4,L,E,B,R //分号分割后长度=4,L,E,B,R
//TJM211030000146 & 10446500228 & 15000 & 2021 - 06 - 28 & 59K0646169 && 10446 && R02472021102600281
// RI & PN & QTY & 4 & BATCH & 5 & 6 & 7 & 8
// RI & PN & QTY & PRODATEyyyy - MM - dd & 5 & 6 & 7 & 8 & 9
try try
{ {
foreach (string code in codes) foreach (string code in codes)
{ {
string[] strarray = code.Split('*'); string[] strarray = code.Split('&');
if (strarray.Length == 5) if (strarray.Length >=5)
{ {
try try
{ {
int num = Convert.ToInt32(strarray[3].Trim()); if (strarray[0].StartsWith("TJM"))
{
return true; return true;
} }
int QTY = Convert.ToInt32(strarray[2].Trim());
if (QTY > 0)
{
return true;
}
}
catch (Exception ex) catch (Exception ex)
{ {
return false; return false;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!