Explorar el Código

优化设备无sn输出

yhluo hace 4 meses
padre
commit
1746cd4d75
Se han modificado 1 ficheros con 9 adiciones y 3 borrados
  1. 9 3
      UAS_MES_BG/FunctionCode/Make/Make_ParseLog.cs

+ 9 - 3
UAS_MES_BG/FunctionCode/Make/Make_ParseLog.cs

@@ -903,8 +903,14 @@ namespace UAS_MES_NEW.Make
                 {
                     if (string.IsNullOrEmpty(item)) continue;
                     string[] currItem = item.Split(',');
-                    string res = "",wo = "",detail = "",line = "";
-                    if(equiType == "SPI")
+                    string res = "",wo = "",detail = "",line = "",sn = "";
+                    sn = currItem[0];
+                    if (string.IsNullOrEmpty(sn))
+                    {
+                        sn = Path.GetFileNameWithoutExtension(PathName);
+                    }
+
+                    if (equiType == "SPI")
                     {
                         res = currItem[1];
                         wo = ma_code.Text;
@@ -939,7 +945,7 @@ namespace UAS_MES_NEW.Make
                     }
                     Log itemLog = new Log()
                     {
-                        SN = currItem[0],
+                        SN = sn,
                         Work_order = wo,
                         Line = line,
                         Source = User.UserSourceCode,