From e608048cf0ca1456e8c21ee54a97c7550eb7c3db Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 21 二月 2023 15:01:30 +0800
Subject: [PATCH] 1

---
 DataLoader/CS/Importor.cs |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/DataLoader/CS/Importor.cs b/DataLoader/CS/Importor.cs
index 401565e..b454147 100644
--- a/DataLoader/CS/Importor.cs
+++ b/DataLoader/CS/Importor.cs
@@ -95,7 +95,7 @@
             vd.Meta.create_user = Tool.UserId;
         }
 
-        public static void ImportFiles(ObservableCollection<ViewData> viewDatas, string target)
+        public static void ImportFiles(ObservableCollection<ViewData> viewDatas, string target, int start)
         {
             Parallel.ForEach(viewDatas, (vd, ParallelLoopState) =>
             {
@@ -109,21 +109,15 @@
                         return;
                     }
 
-                    vd.Status = "鎻掑叆鏁版嵁搴�...";
-                    int start = GetSubPath(target, 1);
-                    SysMeta mf = GetMetaFile(vd, start, guid);
+                    vd.Status = "鑾峰彇鏁版嵁鐩綍...";
+                    int subPath = GetSubPath(target, start);
+                    SysMeta mf = GetMetaFile(vd, subPath, guid);
 
                     vd.Status = "澶嶅埗鏂囦欢...";
                     CopyFile(vd.FilePath, Path.Combine(target, mf.path));
 
-                    int metaId = InsertMeta(mf);
-                    if (metaId == 0)
-                    {
-                        vd.Status = "鍏冩暟鎹嚭閿欙紒";
-                        return;
-                    }
-
-                    vd.Status = "瀹屾垚銆�";
+                    vd.Status = "鍑嗗鍏ュ簱";
+                    vd.Meta = mf;
                 }
                 catch (Exception ex)
                 {
@@ -131,6 +125,12 @@
                     vd.Status = "澶辫触锛�";
                 }
             });
+
+            foreach (ViewData vd in viewDatas)
+            {
+                int metaId = InsertMeta(vd.Meta);
+                vd.Status = metaId == 0 ? "鍏冩暟鎹嚭閿欙紒" : "瀹屾垚銆�";
+            }
         }
 
         public static void ImportFiles2(ObservableCollection<ViewData> viewDatas, string target)

--
Gitblit v1.9.3