yhluo 5 сар өмнө
parent
commit
18d97d37c8

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

@@ -350,10 +350,11 @@ namespace UAS_MES_NEW.Make
 
                 List<Log> logArr = new List<Log>() { };
                 string[] lines = restOfStream.Split(new string[] { "\r\n" }, StringSplitOptions.None);
-                LogMessage($"文件夹{PathName},共{lines.Length}条记录");
+                int fileNum = 0;
                 foreach (var item in lines)
                 {
                     if (string.IsNullOrEmpty(item)) continue;
+                    fileNum++;
                     string[] currItem = item.Split(',');
                     string res = "";
                     /*List<NgData> data = new List<NgData>();*/
@@ -401,6 +402,7 @@ namespace UAS_MES_NEW.Make
 
                     LogMessage($"已解析: {currItem[0]}");
                 }
+                LogMessage($"文件夹{PathName},共{fileNum}条记录");
                 InsertDb(logArr, PathName);
 
                 File.WriteAllText(PathName, string.Empty);