From e47120b1aec14296f84fd246af76675f4c2765a0 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 29 一月 2026 09:40:20 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/RuiShengZhiNeng/GaoPuLiTiKu

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs |  114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 110 insertions(+), 4 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index b7e92f2..1179514 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -18,6 +18,7 @@
 using AutoMapper;
 using SqlSugar;
 using System.Diagnostics.CodeAnalysis;
+using System.Threading.Tasks;
 using WIDESEAWCS_Common;
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core;
@@ -86,10 +87,29 @@
                         {
                             continue;
                         }
-                        if (item.taskType == TaskTypeEnum.MLInbound.ObjToInt())
-                            CreateKLSNewInTask(task, item.taskType);
-                        else if (item.taskType == TaskTypeEnum.MLOutbound.ObjToInt())
-                            CreateKLSNewOutTask(task, item.taskType);
+                        switch (item.taskType)
+                        {
+                            case (int)TaskTypeEnum.MLInbound:
+                                CreateKLSNewInTask(task, item.taskType);
+                                break;
+                            case (int)TaskTypeEnum.MLOutbound:
+                                CreateKLSNewOutTask(task, item.taskType);
+                                break;
+                            case (int)TaskTypeEnum.CPInbound:
+                                CreateRGVNewInTask(task, item.taskType);
+                                break;
+                            case (int)TaskTypeEnum.CPOutbound:
+                                CreateRGVNewOutTask(task, item.taskType);
+                                break;
+                            case (int)TaskTypeEnum.CJInbound:
+                                CreateHKNewInTask(task, item.taskType);
+                                break;
+                            case (int)TaskTypeEnum.CJOutbound:
+                                CreateHKNewOutTask(task, item.taskType);
+                                break;
+                            default:
+                                break;
+                        }
                     }
                 }
             }
@@ -99,6 +119,92 @@
             }
             return content;
         }
+
+        /// <summary>
+        /// 鍙栨秷浠诲姟
+        /// </summary>
+        /// <param name="taskCode">浠诲姟鍙�</param>
+        /// <param name="containerCode">鏂欑鏉$爜</param>
+        /// <returns></returns>
+        public WebResponseContent CancelWMSTask(WMSCancelTask wMSCancelTask)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                Dt_Task dt_Task = BaseDal.QueryFirst(x => x.WMSTaskNum == wMSCancelTask.TaskCode);
+                if (dt_Task == null) throw new Exception("鏈煡璇㈠埌浠诲姟鍙风浉鍏充换鍔�");
+                if (dt_Task.TaskType == TaskTypeEnum.MLInbound.ObjToInt() || dt_Task.TaskType == TaskTypeEnum.CPInbound.ObjToInt() || dt_Task.TaskType == TaskTypeEnum.CJInbound.ObjToInt())
+                    dt_Task.TaskType = TaskInStatusEnum.InCancel.ObjToInt();
+                else if (dt_Task.TaskType == TaskTypeEnum.MLOutbound.ObjToInt() || dt_Task.TaskType == TaskTypeEnum.CPOutbound.ObjToInt() || dt_Task.TaskType == TaskTypeEnum.CJOutbound.ObjToInt())
+                    dt_Task.TaskType = TaskOutStatusEnum.OutCancel.ObjToInt();
+                BaseDal.UpdateData(dt_Task);
+                content.OK();
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+
+
+        /// <summary>
+        /// 淇敼浠诲姟浼樺厛绾�
+        /// </summary>
+        /// <param name="updateTaskPriority"></param>
+        /// <returns></returns>
+        public WebResponseContent UpdateWMSTaskPriority(WMSUpdateTaskPriority updateTaskPriority)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                Dt_Task dt_Task = BaseDal.QueryFirst(x => x.WMSTaskNum == updateTaskPriority.taskCode);
+                if (dt_Task == null) throw new Exception("鏈煡璇㈠埌浠诲姟鍙风浉鍏充换鍔�");
+                dt_Task.Grade = updateTaskPriority.taskPriority;
+                BaseDal.UpdateData(dt_Task);
+                content.OK();
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+
+        /// <summary>
+        /// 淇敼搴撲綅鍒嗗尯
+        /// </summary>
+        /// <returns></returns>
+        public WebResponseContent ModifyWMSLayoutZone(WMSUpdateLocationArea wMSUpdateLocationArea)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                if(wMSUpdateLocationArea.WarehouseId == 1)
+                {
+                    foreach (var LocationCode in wMSUpdateLocationArea.LocationCodes)
+                    {
+                        Dt_RGVLocationInfo dt_RGVLocationInfo = _rGVLocationInfoService.Repository.QueryFirst(x => x.LocationCode == LocationCode);
+                        UpdateLocationCode(dt_RGVLocationInfo,wMSUpdateLocationArea.UpdateAreaCode);
+
+                    }
+                }
+                
+                content.OK();
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+
+        private void UpdateLocationCode(object LocationInfo, string updateAreaCode)
+        {
+           
+        }
+
+
         /// <summary>
         /// 鎺ユ敹WMS浠诲姟淇℃伅
         /// </summary>

--
Gitblit v1.9.3