Răsfoiți Sursa

Merge branch 'master' of http://49.235.130.76/XXF_1122/DaisyNPILine

徐孝锋 6 luni în urmă
părinte
comite
fdeb6dfb45
1 a modificat fișierele cu 7 adăugiri și 1 ștergeri
  1. 7 1
      TeamAAS-VM/Core/Management.cs

+ 7 - 1
TeamAAS-VM/Core/Management.cs

@@ -2857,6 +2857,12 @@ namespace TeamAAS_VP.Core
                 //获取当前工位的配置
                 var stationConfig = _configService.GetDeviceInfo(stationIndex);
                 if (stationConfig == null) return false;
+                // 获取当前产品
+                var currentProduct = _productService.GetCurrentProduct();
+                if (currentProduct == null)
+                {
+                    return false;
+                }
                 //如果保存路径为空,则不保存
                 if (string.IsNullOrEmpty(savePath)) return false;
                 string fullPath = savePath;
@@ -2891,7 +2897,7 @@ namespace TeamAAS_VP.Core
                     }
                     sb.AppendLine();
                 }
-                sb.Append($"{timestamp:yyyy-MM-dd HH:mm:ss},{productMainSN},{Math.Round(ct, 3)},{stationIndex},{stationConfig.DeviceName},,,,");
+                sb.Append($"{timestamp:yyyy-MM-dd HH:mm:ss},{productMainSN},{Math.Round(ct, 3)},{stationIndex},{stationConfig.DeviceName},{currentProduct.Name},{currentProduct.NumberCode},");
                 foreach (var item in dataItems)
                 {
                     sb.Append($"{item.Value},");