Sfoglia il codice sorgente

上料采集界面条码采集长度限制增至80,补充超长度条码采集提示

Hcsy 6 anni fa
parent
commit
517ecf0b62

+ 6 - 4
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -175,7 +175,7 @@ namespace UAS_MES.Make
                                         return;
                                     }
                                 }
-                                TSN.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
+                                TSN.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
                                 if (sp_barcoderule == "BARCODE")
                                 {
                                     sp_soncode = ErrorMessage;
@@ -309,7 +309,7 @@ namespace UAS_MES.Make
                                     {
                                         CollectDataSonCode.Add(sp_soncode);
                                         SPID.Add(sp_id);
-                                        CollectData.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
+                                        CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
                                         sn_code.Text = code.Text;
                                         OperateResult.AppendText(">>序列号" + code.Text + ",物料" + sp_soncode + "上料成功\n", Color.Green);
                                         RemainIndex = RemainIndex + 1;
@@ -414,13 +414,15 @@ namespace UAS_MES.Make
             CollectDataSonCode.Add(sp_soncode);
             //采集成功提示
             RemainIndex = RemainIndex + 1;
-            CollectData.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
+            CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
             if (!CheckBarcode.ContainsKey(sp_fsoncode))
             {
-                CheckBarcode.Add(sp_fsoncode, code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
+                CheckBarcode.Add(sp_fsoncode, code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
             }
             SPID.Add(sp_id);
             OperateResult.AppendText(">>物料" + sp_soncode + "采集成功,条码" + code.Text + "\n", Color.Green);
+            if(code.Text.Length > 80)
+                OperateResult.AppendText(">>采集条码" + code.Text + "程度超过长度限制80,内容截取前80位进行采集\n", Color.Red);
             code.Clear();
             //如果+1后不小于B序列的长度,则已采集完成,不需要进行提示了
             if (RemainIndex < RemainList.Length)

+ 6 - 4
UAS_MES_NEW/FunctionCode/Make/Make_FeedingCollection.cs

@@ -175,7 +175,7 @@ namespace UAS_MES_NEW.Make
                                         return;
                                     }
                                 }
-                                TSN.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
+                                TSN.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
                                 if (sp_barcoderule == "BARCODE")
                                 {
                                     sp_soncode = ErrorMessage;
@@ -309,7 +309,7 @@ namespace UAS_MES_NEW.Make
                                     {
                                         CollectDataSonCode.Add(sp_soncode);
                                         SPID.Add(sp_id);
-                                        CollectData.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
+                                        CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
                                         sn_code.Text = code.Text;
                                         OperateResult.AppendText(">>序列号" + code.Text + ",物料" + sp_soncode + "上料成功\n", Color.Green);
                                         RemainIndex = RemainIndex + 1;
@@ -414,13 +414,15 @@ namespace UAS_MES_NEW.Make
             CollectDataSonCode.Add(sp_soncode);
             //采集成功提示
             RemainIndex = RemainIndex + 1;
-            CollectData.Add(code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
+            CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
             if (!CheckBarcode.ContainsKey(sp_fsoncode))
             {
-                CheckBarcode.Add(sp_fsoncode, code.Text.Substring(0, code.Text.Length > 40 ? 40 : code.Text.Length));
+                CheckBarcode.Add(sp_fsoncode, code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
             }
             SPID.Add(sp_id);
             OperateResult.AppendText(">>物料" + sp_soncode + "采集成功,条码" + code.Text + "\n", Color.Green);
+            if (code.Text.Length > 80)
+                OperateResult.AppendText(">>采集条码" + code.Text + "程度超过长度限制80,内容截取前80位进行采集\n", Color.Red);
             code.Clear();
             //如果+1后不小于B序列的长度,则已采集完成,不需要进行提示了
             if (RemainIndex < RemainList.Length)