From f423e1277f91427f0a767bd1224c1260dcb73086 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 20 四月 2026 22:47:54 +0800
Subject: [PATCH] feat: 添加空箱入库功能及相关优化

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotPrefixCommandHandler.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotPrefixCommandHandler.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotPrefixCommandHandler.cs
index 10c82be..d7aa124 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotPrefixCommandHandler.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotPrefixCommandHandler.cs
@@ -126,7 +126,7 @@
                 var parts = message.Split(',');
 
                 // 妫�鏌ユ秷鎭牸寮忔槸鍚︽湁鏁堬細鑷冲皯瑕佹湁鍛戒护鍓嶇紑锛屼笖鐘舵�佷腑鏈夊綋鍓嶄换鍔�
-                if (parts.Length < 1 || state.CurrentTask == null)
+                if (parts.Length < 1)
                 {
                     return;
                 }
@@ -143,7 +143,7 @@
                     .ToArray();
 
                 // 浠庢暟鎹簱閲嶆柊鏌ヨ褰撳墠浠诲姟锛堢‘淇濊幏鍙栨渶鏂扮姸鎬侊級
-                var task = await _robotTaskService.Repository.QueryFirstAsync(x => x.RobotTaskId == state.CurrentTask.RobotTaskId);
+                var task = await _robotTaskService.Repository.QueryFirstAsync(x => x.RobotTaskState == TaskRobotStatusEnum.RobotExecuting.GetHashCode() && x.RobotRoadway == state.RobotCrane.DeviceName);
 
                 if (task != null)
                 {

--
Gitblit v1.9.3