From 761260f2ac0aa211625c8904cc86fc2400a8adfc Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 04 三月 2026 16:56:57 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
index 5253d68..e842337 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
@@ -67,10 +67,9 @@
         {
             try
             {
-                Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == taskDTO.fromLocationCode);
-                if (kLSLocationInfo == null) throw new Exception($"鏈壘鍒拌捣鐐瑰簱浣嶃�恵taskDTO.fromLocationCode}銆戯紒");
+                Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == taskDTO.fromLocationCode) ?? throw new Exception($"鏈壘鍒拌捣鐐瑰簱浣嶃�恵taskDTO.fromLocationCode}銆戯紒");
                 if (kLSLocationInfo.LocationStatus != LocationStatusEnum.InStock.ObjToInt()) throw new Exception($"璧风偣搴撲綅銆恵taskDTO.fromLocationCode}銆戝綋鍓嶅簱浣嶇姸鎬佷笉鍙嚭搴擄紒");
-                Dt_Task dt_Task = new Dt_Task()
+                Dt_Task dt_Task = new()
                 {
                     TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
                     WMSTaskNum = taskDTO.taskCode,
@@ -104,7 +103,15 @@
         #region 5 璺ㄦゼ灞傝繍杈撲换鍔″垱寤�
         public WebResponseContent CarryTask(TaskDTO taskDTO, int taskType)
         {
-            return WebResponseContent.Instance.OK();
+            try
+            {
+
+                return WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                throw new Exception(ex.Message);
+            }
         }
         #endregion
 

--
Gitblit v1.9.3