From 0f1717cbe5c788c294a53cd4df6f819ca0236500 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 09 三月 2026 10:42:27 +0800
Subject: [PATCH] 优化成品仓逻辑

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 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 688a447..4ab35cd 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"
@@ -96,7 +96,8 @@
                         if (!content.Status) throw new Exception(content.Message);
                         if (BaseDal.QueryFirst(x => x.WMSTaskNum == task.taskCode || x.PalletCode == task.containerCode) != null)
                         {
-                            continue;
+                            throw new Exception($"浠诲姟鍙枫�恵task.taskCode}銆�/鎵樼洏鍙枫�恵task.containerCode}銆戝凡瀛樺湪浠诲姟");
+                            //continue;
                         }
                         switch (item.taskType)
                         {
@@ -191,7 +192,8 @@
                 {
                     CancelSXCTake cancelSXCTake = new CancelSXCTake
                     {
-                        taskID = dt_Task.RGVTaskId
+                        taskID = dt_Task.RGVTaskId,
+                        withoutRunning = 1
                     };
                     Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(CancelSXCTake));
                     if (apiInfo == null) throw new Exception("鏈壘鍒板洓鍚戣溅AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
@@ -201,11 +203,11 @@
                     {
                         //鐩存帴绉诲叆鍘嗗彶
                         BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.鑷姩瀹屾垚);
-                        return content.OK("鍙栨秷浠诲姟鎴愬姛", dt_Task);
+                        return content.OK($"鍙栨秷浠诲姟銆恵dt_Task.WMSTaskNum}銆戞垚鍔�", dt_Task);
                     }
                     else
                     {
-                        return content.Error($"浠诲姟澶辫触{fOURBOTReturn.data}");
+                        return content.Error($"浠诲姟鍙栨秷澶辫触銆恵dt_Task.WMSTaskNum}銆憑fOURBOTReturn.returnUserMsg}");
                     }
                 }
                 #endregion
@@ -304,7 +306,7 @@
                         priority = updateTaskPriority.taskPriority
                     };
                     Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(UpdateAgvSXCTake));
-                    if (apiInfo == null) throw new Exception("鏈壘鍒板洓鍚戣溅AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
+                    if (apiInfo == null) throw new Exception("鏈壘鍒版洿鏂板洓鍚戣溅浠诲姟浼樺厛绾ф帴鍙i厤缃俊鎭紒璇锋鏌ユ帴鍙i厤缃�");
                     string response = HttpHelper.Post(apiInfo.ApiAddress, request.Serialize());
                     FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
                     if (fOURBOTReturn.returnCode == 0 && fOURBOTReturn.returnUserMsg == "鎴愬姛")
@@ -1057,7 +1059,8 @@
                 };
                 string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOToccupyStation.Serialize());
                 FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
-                if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg);
+                if (fOURBOTReturn.returnCode != 0 && fOURBOTReturn.returnUserMsg != $"绔欑偣宸茶鍗犵敤,(podID={iQC.ContainerCode})")
+                    throw new Exception(fOURBOTReturn.returnUserMsg);
                 #endregion
 
                 #region 鍒涘缓鍥涘悜杞︿换鍔�
@@ -1105,7 +1108,7 @@
                 var Agvlocation = _rGVLocationInfoService.Repository.QueryData(x => fOURBOTStorageStatusNotify.storageCode.Contains(x.LocationCode));
                 foreach (var item in Agvlocation)
                 {
-                    item.LocationStatus = (int)(fOURBOTStorageStatusNotify.disable == 0 ? EnableStatusEnum.Normal : EnableStatusEnum.Disable);
+                    item.EnableStatus = (int)(fOURBOTStorageStatusNotify.disable == 0 ? EnableStatusEnum.Normal : EnableStatusEnum.Disable);
                 }
                 _rGVLocationInfoService.UpdateData(Agvlocation);
                 return WebResponseContent.Instance.OK();

--
Gitblit v1.9.3