From cbfc5ac3c45eff75e912ba6aeaad83533a1a4296 Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期二, 07 四月 2026 16:16:22 +0800
Subject: [PATCH] fix: 修复机器人任务信息等bug

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs
index 8a55144..ea25892 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs
@@ -116,7 +116,7 @@
             ILogger<RobotJob> logger)
         {
             // 鍒濆鍖栫姸鎬佺鐞嗗櫒锛屼紶鍏ョ紦瀛樻湇鍔�
-            _stateManager = new RobotStateManager(cache);
+            _stateManager = new RobotStateManager(cache, _logger);
             _logger = logger;
 
             // 鍒涘缓 Socket 缃戝叧锛屽皝瑁� TcpSocketServer 鐨勮闂�
@@ -124,10 +124,10 @@
             ISocketClientGateway socketGateway = new SocketClientGateway(tcpSocket);
 
             // 鍒濆鍖栦换鍔″鐞嗗櫒
-            _taskProcessor = new RobotTaskProcessor(socketGateway, _stateManager, robotTaskService, taskService, httpClientHelper);
+            _taskProcessor = new RobotTaskProcessor(socketGateway, _stateManager, robotTaskService, taskService, httpClientHelper, _logger);
 
             // 鍒濆鍖栧鎴风绠$悊鍣�
-            _clientManager = new RobotClientManager(tcpSocket, _stateManager);
+            _clientManager = new RobotClientManager(tcpSocket, _stateManager, _logger);
 
             // 鍒濆鍖栧懡浠ゅ鐞嗗櫒
             // 绠�鍗曞懡浠ゅ鐞嗗櫒锛氬鐞嗙姸鎬佹洿鏂扮瓑绠�鍗曞懡浠�
@@ -139,7 +139,7 @@
             _messageRouter = new RobotMessageHandler(socketGateway, _stateManager, cache, simpleCommandHandler, prefixCommandHandler, logger);
 
             // 鍒濆鍖栧伐浣滄祦缂栨帓鍣�
-            _workflowOrchestrator = new RobotWorkflowOrchestrator(_stateManager, _clientManager, _taskProcessor, robotTaskService);
+            _workflowOrchestrator = new RobotWorkflowOrchestrator(_stateManager, _clientManager, _taskProcessor, robotTaskService, _logger);
 
             // 璁㈤槄瀹㈡埛绔柇寮�杩炴帴浜嬩欢
             _clientManager.OnClientDisconnected += OnClientDisconnected;
@@ -229,12 +229,12 @@
                     }
 
                     // 妫�鏌ヤ换鍔℃�绘暟鏄惁鏈揪鍒颁笂闄�
-                    if (latestState.RobotTaskTotalNum < MaxTaskTotalNum)
-                    {
+                    //if (latestState.RobotTaskTotalNum < MaxTaskTotalNum)
+                    //{
                         // 璋冪敤宸ヤ綔娴佺紪鎺掑櫒鎵ц浠诲姟
                         // 缂栨帓鍣ㄤ細鏍规嵁褰撳墠鐘舵�佸喅瀹氫笅涓�姝ュ姩浣�
                         await _workflowOrchestrator.ExecuteAsync(latestState, task, ipAddress);
-                    }
+                    //}
                 }
             }
             catch (Exception ex)

--
Gitblit v1.9.3