From 90ac374a64e47e2bd97ee9245f4cafb50ad5dbbb Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 17 四月 2026 17:31:02 +0800
Subject: [PATCH] 添加成品出库任务等待移库上报WMS

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs |   31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
index 12f5f2d..0901fed 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
@@ -165,7 +165,7 @@
                                             task.ExceptionMessage = $"銆恵task.SourceAddress}銆戝啓鍏�3妤煎嚭搴撶鏀惧埌浣嶅け璐�";
                                             task.Remark = $"{device.DeviceCode}_Outboundboxon_{1}_{task.SourceAddress}"; throw;
                                         }
-                                        
+
                                     }
                                     BaseDal.UpdateData(task);
                                 }
@@ -201,7 +201,7 @@
                                             task.ExceptionMessage = $"銆恵task.TargetAddress}銆戝啓鍏�4妤肩┖绠辨斁鍒颁綅澶辫触";
                                             task.Remark = $"{device.DeviceCode}_Emptyboxplacedinposition_{1}_{task.TargetAddress}";
                                         }
-                                        
+
                                     }
                                     BaseDal.UpdateData(task);
                                 }
@@ -237,7 +237,7 @@
                                             task.ExceptionMessage = $"銆恵task.SourceAddress}銆戝啓鍏�4妤煎嚭搴撳彇绠卞畬鎴愬け璐�";
                                             task.Remark = $"{device.DeviceCode}_Outboundboxretrievalcompleted_{1}_{task.SourceAddress}";
                                         }
-                                      
+
                                     }
                                     BaseDal.UpdateData(task);
                                 }
@@ -274,7 +274,7 @@
                                             task.ExceptionMessage = $"銆恵Address}銆戝叧闂姹傝繘鍏ュけ璐ワ紒";
                                             task.Remark = $"{device.DeviceCode}_RequestToEnter_{false}_{Address}";
                                         }
-                                        
+
                                     }
                                     BaseDal.UpdateData(task);
                                 }
@@ -318,7 +318,7 @@
                                         task.ExceptionMessage = $"銆怲SJR3F銆�3妤艰鐮佽Е鍙戝け璐ワ紒";
                                         task.Remark = $"{device.DeviceCode}_Codereadingtriggered_{1}_TSJR3F";
                                     }
-                                    
+
                                 }
                                 task.TaskState = (int)TaskStatusEnum.CheckPalletCodeing;
                                 BaseDal.UpdateData(task);
@@ -375,7 +375,7 @@
                     var task = BaseDal.QueryFirst(x => x.PalletCode == Rgv.content.podID);
                     if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟缂栧彿銆恵Rgv.content.taskID}銆�");
                     //绉诲簱
-                    if (task.TaskType == TaskTypeEnum.CPMoveInventory.ObjToInt())
+                    if (task.TaskType == TaskTypeEnum.CPMoveInventory.ObjToInt() && string.IsNullOrEmpty(task.WMSTaskNum))
                     {
                         if (Rgv.messageType == 72)
                         {
@@ -419,15 +419,18 @@
                             if (task.TaskType == (int)TaskTypeEnum.CPInbound && task.TaskState == (int)TaskStatusEnum.Execut)
                             {
                                 task.TaskState = (int)TaskStatusEnum.WaiCheckShape;
-                                //BaseDal.UpdateData(task);//缁欒川妫�闂ㄥ啓鍏ュ惎鍔ㄤ俊鍙�
-                                var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "F1") as OtherDevice;
-                                if (device == null) task.ExceptionMessage = "鏈壘鍒�1妤艰川妫�闂ㄨ澶囦俊鎭�";
-                                else
+                                if (task.SourceAddress != "OUT-01")
                                 {
-                                    if (device.IsConnected)
-                                        device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
+                                    //BaseDal.UpdateData(task);//缁欒川妫�闂ㄥ啓鍏ュ惎鍔ㄤ俊鍙�
+                                    var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "F1") as OtherDevice;
+                                    if (device == null) task.ExceptionMessage = "鏈壘鍒�1妤艰川妫�闂ㄨ澶囦俊鎭�";
                                     else
-                                        task.ExceptionMessage = "1妤艰川妫�闂ㄨ澶囪繛鎺ュけ璐�";
+                                    {
+                                        if (device.IsConnected)
+                                            device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
+                                        else
+                                            task.ExceptionMessage = "1妤艰川妫�闂ㄨ澶囪繛鎺ュけ璐�";
+                                    }
                                 }
                                 TaskFeedback(task, 4);
                             }
@@ -684,7 +687,7 @@
                     {
                         if (locationStatusEnum == LocationStatusEnum.Free) //濡傛灉璧风偣瀹屾垚灏辩粰璐т綅璧嬪�兼墭鐩樺彿
                         {
-                            stationManger.Remark ="";
+                            stationManger.Remark = "";
                             stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt();
                         }
                         else

--
Gitblit v1.9.3