|
|
@@ -144,7 +144,12 @@ namespace UAS_MES.Make
|
|
|
string sp_barcoderule = dt1.Rows[RemainIndex]["sp_barcoderule"].ToString();
|
|
|
if (LogicHandler.CheckSNBeforeLoad(ma_code.Text, code.Text, sp_fsoncode, sp_soncode, sp_barcoderule, sp_prefix, length, out ErrorMessage))
|
|
|
{
|
|
|
- TSN.Add(code.Text);
|
|
|
+ if (CollectData.Contains(code.Text))
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>条码" + code.Text + "已经上料\n", Color.Red, code);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ TSN.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
|
|
|
if (sp_barcoderule == "BARCODE")
|
|
|
{
|
|
|
sp_soncode = ErrorMessage;
|
|
|
@@ -270,7 +275,7 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
CollectDataSonCode.Add(sp_soncode);
|
|
|
SPID.Add(sp_id);
|
|
|
- CollectData.Add(code.Text);
|
|
|
+ CollectData.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
|
|
|
sn_code.Text = code.Text;
|
|
|
OperateResult.AppendText(">>序列号" + code.Text + ",物料" + sp_soncode + "上料成功\n", Color.Green);
|
|
|
RemainIndex = RemainIndex + 1;
|
|
|
@@ -375,7 +380,7 @@ namespace UAS_MES.Make
|
|
|
CollectDataSonCode.Add(sp_soncode);
|
|
|
//采集成功提示
|
|
|
RemainIndex = RemainIndex + 1;
|
|
|
- CollectData.Add(code.Text);
|
|
|
+ CollectData.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
|
|
|
SPID.Add(sp_id);
|
|
|
OperateResult.AppendText(">>物料" + sp_soncode + "采集成功,条码" + code.Text + "\n", Color.Green);
|
|
|
code.Clear();
|