WIN-GH9CEESPLTB\Administrator hace 2 meses
padre
commit
4e3554fbd3
Se han modificado 1 ficheros con 12 adiciones y 13 borrados
  1. 12 13
      MainForm/FaForm/Form_Home.cs

+ 12 - 13
MainForm/FaForm/Form_Home.cs

@@ -2107,7 +2107,7 @@ namespace MainForm
                 stopwatch1.Start();
                 AddMessage(LogType.Info, stationNameStr + "_进站开始");
                 string sn = (string)stPLC_MesData.BarcodeSet.strProductBarcode;  // 产品SN(物料码),现在PLC只有10和50返回
-                sn = sn.Substring(sn.Length - 11, 4) + sn.Substring(sn.Length - 5, 5);
+                //sn = sn.Substring(sn.Length - 11, 4) + sn.Substring(sn.Length - 5, 5);
 
                 string MachineId = GlobalContext.S2_MachineId;  // 装备ID(可配置)
                 string StationId = GlobalContext.S2_StationId;  // 工位ID(可配置)
@@ -2119,11 +2119,11 @@ namespace MainForm
                     AddMessage(LogType.Error, $"{stationNameStr}_未能查到已绑定的载具信息,无法进行载具绑定产品验证");
                 }
                 //这个地方之后PLC可能会返回SN码,到时用返回的和数据库中的比较下对错,结果faalse怎么办现在不知道
-                //sn = strProductBarcode;
-                if (sn != strProductBarcode)
-                {
-                    AddMessage(LogType.Info, $"进站产品码错误!与载具绑定的产品码不匹配,进站产品码:{sn};载具绑定产品码:{strProductBarcode}");
-                }
+                //if (sn != strProductBarcode)
+                //{
+                //    AddMessage(LogType.Info, $"进站产品码错误!与载具绑定的产品码不匹配,进站产品码:{sn};载具绑定产品码:{strProductBarcode}");
+                //}
+                sn = strProductBarcode;
                 AddMessage(LogType.Info, $"载具码:{strCarrierBarcode};产品码:{sn}");
 
                 // 产品SN(物料码)校验
@@ -3088,7 +3088,7 @@ namespace MainForm
                 stopwatch1.Start();
                 AddMessage(LogType.Info, stationNameStr + "_进站开始");
                 string sn = (string)stPLC_MesData.BarcodeSet.strProductBarcode;  // 产品SN(物料码)
-                sn = sn.Substring(sn.Length - 11, 4) + sn.Substring(sn.Length - 5, 5);
+                //sn = sn.Substring(sn.Length - 11, 4) + sn.Substring(sn.Length - 5, 5);
 
                 string MachineId = GlobalContext.S5_MachineId;  // 装备ID(可配置)
                 string StationId = GlobalContext.S5_StationId;  // 工位ID(可配置)
@@ -3100,12 +3100,11 @@ namespace MainForm
                     AddMessage(LogType.Error, $"{stationNameStr}_未能查到已绑定的载具信息,无法进行载具绑定产品验证");
                 }
                 //这个地方之后PLC可能会返回SN码,到时用返回的和数据库中的比较下对错,结果faalse怎么办现在不知道
-                //sn = strProductBarcode;
-                if (sn != strProductBarcode)
-                {
-                    AddMessage(LogType.Info, $"进站产品码错误!与载具绑定的产品码不匹配,进站产品码:{sn};载具绑定产品码:{strProductBarcode}");
-                }
-
+                //if (sn != strProductBarcode)
+                //{
+                //    AddMessage(LogType.Info, $"进站产品码错误!与载具绑定的产品码不匹配,进站产品码:{sn};载具绑定产品码:{strProductBarcode}");
+                //}
+                sn = strProductBarcode;
                 AddMessage(LogType.Info, $"载具码:{strCarrierBarcode};产品码:{sn}");
 
                 // 产品SN(物料码)校验