From 5a15fa73d5f6a39917013871a65eb11a8c013391 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 05 十一月 2025 17:30:56 +0800
Subject: [PATCH] 1

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
index 9152ae9..4d5efec 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
@@ -87,11 +87,8 @@
                             var task = _taskRepository.QueryFirst(x => x.TaskState == (int)TaskInStatusEnum.Line_InExecuting && x.TaskNum == conmmand.ConveyorLineTargetAddress);
                             if (task != null)
                             {
-                                task.TaskState = (int)TaskInStatusEnum.Line_InFinish;
-                                task.CurrentAddress = task.NextAddress;
-                                //鑾峰彇WMS璐т綅淇℃伅
-                                task.NextAddress = task.TargetAddress;
-                                _taskRepository.UpdateData(task);
+                                WebResponseContent content = _taskService.UpdateTaskStatusToNext(task.TaskNum);
+                                WriteInfo(conveyorLine.DeviceName, $"{JsonConvert.SerializeObject(content)}");
                             }
                         }
 
@@ -101,6 +98,10 @@
 
                             if (task != null && task.AGVSign == "RequestPickUp")
                             {
+                                if (!structs[3])
+                                {
+                                    conveyorLine.Communicator.WriteNoRead("DB100.0", Convert.ToInt32(9999));
+                                }
                                 if (conveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.AllowPickUp, "LK001") == 1)
                                 {
                                     await _taskService.ContinueAgvTask(task.AGVTaskNum);
@@ -111,6 +112,10 @@
                             }
                             if (task != null && task.AGVSign == "RequestPut")
                             {
+                                if (!structs[3])
+                                {
+                                    conveyorLine.Communicator.WriteNoRead("DB100.0", Convert.ToInt32(9999));
+                                }
                                 if (conveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.AllowPut, "LK001") == 1)
                                 {
                                     await _taskService.ContinueAgvTask(task.AGVTaskNum);

--
Gitblit v1.9.3