From 12b86d75b82acd4930062e38a533743b22b558ae Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <1247017146@qq.com>
Date: 星期四, 05 六月 2025 10:21:36 +0800
Subject: [PATCH] 批量删除任务

---
 CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs                                                         |   27 +++++++++++++++------------
 CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs   |    2 +-
 CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs |    2 +-
 3 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs
index 898bb07..450a120 100644
--- a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs
@@ -14,7 +14,7 @@
 [assembly: System.Reflection.AssemblyCompanyAttribute("WIDESEA_IStoragIntegrationRepository")]
 [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
 [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c2aaf06dab8a627948ee2e5574fe4598f8d1638f")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a4c8fa1c25d1755356afe2bfa21a66125254ce47")]
 [assembly: System.Reflection.AssemblyProductAttribute("WIDESEA_IStoragIntegrationRepository")]
 [assembly: System.Reflection.AssemblyTitleAttribute("WIDESEA_IStoragIntegrationRepository")]
 [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs
index b5f38b8..ebaf2a4 100644
--- a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs
@@ -14,7 +14,7 @@
 [assembly: System.Reflection.AssemblyCompanyAttribute("WIDESEA_StoragIntegrationRepository")]
 [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
 [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c2aaf06dab8a627948ee2e5574fe4598f8d1638f")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a4c8fa1c25d1755356afe2bfa21a66125254ce47")]
 [assembly: System.Reflection.AssemblyProductAttribute("WIDESEA_StoragIntegrationRepository")]
 [assembly: System.Reflection.AssemblyTitleAttribute("WIDESEA_StoragIntegrationRepository")]
 [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index b8b4805..f1e1cbe 100644
--- a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -1840,20 +1840,23 @@
         // 鍒涘缓鍘嗗彶浠诲姟瀹炰緥妯″瀷
         try
         {
-            Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key[0]));
-            if (task == null)
+            foreach (var item in key)
             {
-                return content.Error("鏈壘鍒颁换鍔′俊鎭�!");
+                Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key));
+                if (task == null)
+                {
+                    return content.Error("鏈壘鍒颁换鍔′俊鎭�!");
+                }
+                var taskHtyNG = CreateHistoricalTask(task, true);
+
+                // 鎵ц鏁版嵁搴撲簨鍔�
+
+                // 娣诲姞鍘嗗彶浠诲姟
+                var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0;
+
+                // 鍒犻櫎浠诲姟鏁版嵁
+                var isTaskDelete = BaseDal.Delete(task.TaskId);
             }
-            var taskHtyNG = CreateHistoricalTask(task, true);
-
-            // 鎵ц鏁版嵁搴撲簨鍔�
-
-            // 娣诲姞鍘嗗彶浠诲姟
-            var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0;
-
-            // 鍒犻櫎浠诲姟鏁版嵁
-            var isTaskDelete = BaseDal.Delete(task.TaskId);
 
             return content.OK("鍒犻櫎鎴愬姛!");
         }

--
Gitblit v1.9.3