Commit e2bf183f LN

p/n 的码是P打头,SKID码是2T475打头

1 个父辈 5a3867e6
...@@ -214,3 +214,13 @@ IO模块读取时间改为可配置。 ...@@ -214,3 +214,13 @@ IO模块读取时间改为可配置。
报警消息WarnMsg 改为WarnIfo对象。 报警消息WarnMsg 改为WarnIfo对象。
后面自动上下料 RC1252 修改。
DI9 不要,只判断DI10
压紧轴改为伺服,压紧轴计量检测信号去掉。
20190814修改:
匈牙利条码拼接修改,如果有2T475则拼接,没有的话按原来的方式返回。
// p/n 的码是P打头,SKID码是2T475打头
// RI;PN;QTY
\ No newline at end of file \ No newline at end of file
...@@ -374,6 +374,40 @@ namespace OnlineStore.DeviceLibrary ...@@ -374,6 +374,40 @@ namespace OnlineStore.DeviceLibrary
// StoreManager.Store.onCodeReceived(message); // StoreManager.Store.onCodeReceived(message);
}); });
} }
public static string ProcessBarcode(List<string> codeList )
{
// p/n 的码是P打头,SKID码是2T475打头
// RI;PN;QTY
string split = ";";
string result = "";
try
{
List<string> rCodes = new List<string>();
string pCode = GetCodeByStart(codeList, "P");
string riCode = GetCodeByStart(codeList, "2T475");
if (riCode.Equals(""))
{
return result;
}
else
{
result = riCode + split + pCode + split + "1";
}
}catch(Exception ex)
{
LogUtil.error("ProcessBarcode出错:"+ex.ToString());
}
return result;
}
private static string GetCodeByStart(List<string> codeList, string start)
{
List<string> pCode = (from m in codeList where m.StartsWith(start) select m).ToList<string>();
if (pCode.Count > 0)
{
return pCode[0];
}
return "";
}
#endregion #endregion
private static void CylinderMove(string highType, string lowType, bool isWait) private static void CylinderMove(string highType, string lowType, bool isWait)
...@@ -393,13 +427,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -393,13 +427,21 @@ namespace OnlineStore.DeviceLibrary
//string[] codeArray = LastCode.Split(new string[] { spiltStr}); //string[] codeArray = LastCode.Split(new string[] { spiltStr});
if (LastCodeList.Count > 0) if (LastCodeList.Count > 0)
{ {
foreach (string code in LastCodeList) string codeInfo = ProcessBarcode(LastCodeList);
if (codeInfo.Equals(""))
{ {
if (!code.Equals("")) foreach (string code in LastCodeList)
{ {
msg = msg + "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + code + spiltStr; if (!code.Equals(""))
{
msg = msg + "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + code + spiltStr;
}
} }
} }
else
{
msg = "=1+0x0-" + LastWidth + "x" + LastHeight + "=" + codeInfo;
}
} }
else if (!LastCode.Equals("")) else if (!LastCode.Equals(""))
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!