From 0b2869539598059704e1d208e2bcb18603b0fe0f Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 01 五月 2026 00:00:30 +0800
Subject: [PATCH] feat(出库时效): 添加出库时效配置功能
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs
index 8daf967..ecb24ae 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotJob.cs
@@ -122,7 +122,7 @@
// 鍒濆鍖栧懡浠ゅ鐞嗗櫒
// 绠�鍗曞懡浠ゅ鐞嗗櫒锛氬鐞嗙姸鎬佹洿鏂扮瓑绠�鍗曞懡浠�
- var simpleCommandHandler = new RobotSimpleCommandHandler(_taskProcessor, socketGateway, _logger);
+ var simpleCommandHandler = new RobotSimpleCommandHandler(_taskProcessor, socketGateway, _logger, _stateManager);
// 鍓嶇紑鍛戒护澶勭悊鍣細澶勭悊 pickfinished銆乸utfinished 绛夊甫鍙傛暟鐨勫懡浠�
var prefixCommandHandler = new RobotPrefixCommandHandler(robotTaskService, _taskProcessor, _stateManager, socketGateway, fakeBatteryPositionService, _logger);
@@ -209,13 +209,21 @@
}
// 杞鑾峰彇璇ヨ澶囩殑寰呭鐞嗕换鍔�
- var task = _taskProcessor.GetTask(robotCrane);
+ // 浼樺厛閫氳繃鐘舵�佷腑缂撳瓨鐨勪换鍔$紪鍙锋煡鎵炬墽琛屼腑鐨勪换鍔�
+ Dt_RobotTask? task = null;
+ if (state.CurrentTaskNum.HasValue)
+ {
+ task = _taskProcessor.GetTaskByNum(state.CurrentTaskNum.Value);
+ }
+
+ // 缂撳瓨鐨勪换鍔″彿鏈壘鍒板搴斾换鍔℃椂锛屾寜璁惧缂栫爜鑾峰彇鏂颁换鍔�
+ task ??= _taskProcessor.GetTask(robotCrane);
// 濡傛灉娌℃湁鑾峰彇鍒板緟澶勭悊浠诲姟锛屼笖RobotArmObject涓�1锛堟湁鐗╂枡锛夛紝鍒欒幏鍙栬璁惧鎵ц涓殑浠诲姟
- if (task == null && state.RobotArmObject == 1)
- {
- task = _taskProcessor.GetExecutingTask(robotCrane);
- }
+ //if (task == null && state.RobotArmObject == 1)
+ //{
+ // task = _taskProcessor.GetExecutingTask(robotCrane);
+ //}
// 濡傛灉鏈夊緟澶勭悊浠诲姟
if (task != null)
--
Gitblit v1.9.3