From 0f710285d9f02e3d4cea19557e17945e9ef9532b Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期五, 01 五月 2026 09:48:49 +0800
Subject: [PATCH] Merge branch 'dev' of http://115.159.85.185:8098/r/SuZhouGuanHong/ShanMeiXinNengYuan into dev

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs
index 8cba5b3..6d8f9a7 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs
@@ -271,6 +271,7 @@
                 if (stateToUpdate != null)
                 {
                     stateToUpdate.CurrentTask = task;
+                    stateToUpdate.CurrentTaskNum = task.RobotTaskNum;
 
                     if (_stateManager.TryUpdateStateSafely(ipAddress, stateToUpdate))
                     {
@@ -356,10 +357,16 @@
 
                         QuartzLogHelper.LogInfo(_logger, $"HandlePutFinishedStateAsync锛氳鍙栫殑鐢佃姱鏉$爜鍞竴锛岀户缁墽琛岋紝浠诲姟鍙�: {task.RobotTaskNum}", stateForUpdate?.RobotCrane?.DeviceName ?? ipAddress);
 
-                        // 灏嗘潯鐮佹坊鍔犲埌鐘舵�佷腑锛屼緵鍚庣画鏀捐揣鏃朵娇鐢�
-                        stateForUpdate.CellBarcode = new List<string>()
+                        // 灏嗘潯鐮佺疮绉埌 CellBarcode锛堝幓閲嶏級锛屽苟璁剧疆褰撳墠鎵规鏉$爜
+                        if (!stateForUpdate.CellBarcode.Contains(trayBarcode1))
+                            stateForUpdate.CellBarcode.Add(trayBarcode1);
+                        if (!stateForUpdate.CellBarcode.Contains(trayBarcode2))
+                            stateForUpdate.CellBarcode.Add(trayBarcode2);
+
+                        // 璁剧疆褰撳墠鎵规鏉$爜锛岀敤浜� WMS 鎻愪氦
+                        stateForUpdate.CurrentBatchBarcodes = new List<string>()
                         {
-                            trayBarcode1,trayBarcode2
+                            trayBarcode1, trayBarcode2
                         };
                     }
 

--
Gitblit v1.9.3