From c329a05c7407557c06d3d974161672366bd613d3 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 20 四月 2026 23:56:17 +0800
Subject: [PATCH] fix(StockInfoService): close DeleteStockWithDetailsAsync method properly

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotPrefixCommandHandler.cs |    5 +++--
 1 files changed, 3 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 fe8979f..d7aa124 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotPrefixCommandHandler.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotPrefixCommandHandler.cs
@@ -1,6 +1,7 @@
 using System.Net.Sockets;
 using WIDESEAWCS_Common.HttpEnum;
 using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_ITaskInfoService;
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_Tasks.Workflow.Abstractions;
@@ -125,7 +126,7 @@
                 var parts = message.Split(',');
 
                 // 妫�鏌ユ秷鎭牸寮忔槸鍚︽湁鏁堬細鑷冲皯瑕佹湁鍛戒护鍓嶇紑锛屼笖鐘舵�佷腑鏈夊綋鍓嶄换鍔�
-                if (parts.Length < 1 || state.CurrentTask == null)
+                if (parts.Length < 1)
                 {
                     return;
                 }
@@ -142,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