From f7f1f176f931f5ad54056df7b8e8a9f028eea100 Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期二, 17 十二月 2024 19:50:38 +0800
Subject: [PATCH] 合并

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
index 11c2526..edccca3 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -272,9 +272,25 @@
                 ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍏ュ簱瀹屾垚,涓嬩竴鐩爣鍦板潃銆愮瓑寰呭垎閰嶈揣浣嶃��");
                 ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
 
-                WebResponseContent content = _taskService.UpdateTaskStatusToNext(task);
+                if (task.TaskType == (int)TaskInboundTypeEnum.InNG)
+                {
+                    int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskInStatusEnum>();
 
-                Console.Out.WriteLine(content.Serialize());
+                    var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.SourceAddress);
+                    task.CurrentAddress = station.stationLocation;
+                    task.NextAddress = station.stationNGLocation;
+                    task.TargetAddress = task.NextAddress;
+                    task.TaskState = nextStatus; 
+                    task.ModifyDate = DateTime.Now;
+                    task.Modifier = "System";
+                    _taskRepository.UpdateData(task);
+                }
+                else
+                {
+                    WebResponseContent content = _taskService.UpdateTaskStatusToNext(task);
+                    Console.Out.WriteLine(content.ToJsonString());
+                }
+
             }
         }
 

--
Gitblit v1.9.3