From b6c983ac19c0c80744795e122575f4b9ac145414 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期日, 19 四月 2026 18:53:40 +0800
Subject: [PATCH] feat: 更新机器人任务处理逻辑和接口配置
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 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 fbb989d..0ac900b 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs
@@ -253,7 +253,7 @@
{
if (state.IsScanNG)
{
- taskString = $"Putbattery,4";
+ taskString = $"Putbattery,1";
}
else
{
@@ -332,11 +332,11 @@
// 濡傛灉鏄粍鐩樹换鍔�
if (task.RobotTaskType == RobotTaskTypeEnum.GroupPallet.GetHashCode())
{
-
- //if (!stateForUpdate.BatteryArrived)
- //{
- // return;
- //}
+ // 妫�鏌ョ數姹犳槸鍚﹀凡鍒颁綅
+ if (!stateForUpdate.BatteryArrived)
+ {
+ return;
+ }
// 璇诲彇绾夸綋鐢佃姱鏉$爜
string trayBarcode1 = RobotBarcodeGenerator.GenerateTrayBarcode("DB40.990");
string trayBarcode2 = RobotBarcodeGenerator.GenerateTrayBarcode("DB40.1020");
@@ -359,16 +359,13 @@
{
_logger.LogInformation("HandlePutFinishedStateAsync锛氳鍙栫殑鎵樼洏鏉$爜鍞竴锛岀户缁墽琛岋紝浠诲姟鍙�: {TaskNum}", task.RobotTaskNum);
QuartzLogger.Info($"璇诲彇鐨勬墭鐩樻潯鐮佸敮涓�锛岀户缁墽琛�", stateForUpdate.RobotCrane.DeviceName);
+
+ // 灏嗘潯鐮佹坊鍔犲埌鐘舵�佷腑锛屼緵鍚庣画鏀捐揣鏃朵娇鐢�
stateForUpdate.CellBarcode = new List<string>()
{
trayBarcode1,trayBarcode2
};
-
- // 灏嗘潯鐮佹坊鍔犲埌鐘舵�佷腑锛屼緵鍚庣画鏀捐揣鏃朵娇鐢�
- //stateForUpdate.CellBarcode.Add(trayBarcode1);
- //stateForUpdate.CellBarcode.Add(trayBarcode2);
}
-
// 璁板綍鏃ュ織锛氳鍙栨墭鐩樻潯鐮佹垚鍔�
_logger.LogInformation("HandlePutFinishedStateAsync锛氳鍙栨墭鐩樻潯鐮佹垚鍔�: {Barcode1}+{Barcode2}锛屼换鍔″彿: {TaskNum}", trayBarcode1, trayBarcode2, task.RobotTaskNum);
@@ -380,8 +377,8 @@
else
{
// 鏉$爜璇诲彇澶辫触锛岃褰曢敊璇棩蹇�
- _logger.LogError("HandlePutFinishedStateAsync锛氳鍙栨墭鐩樻潯鐮佸け璐ワ紝浠诲姟鍙�: {TaskNum}", task.RobotTaskNum);
- QuartzLogger.Error($"璇诲彇鎵樼洏鏉$爜澶辫触", stateForUpdate.RobotCrane.DeviceName);
+ _logger.LogError("HandlePutFinishedStateAsync锛氳鍙栨墭鐩樻潯鐮佸け璐ワ紝浠诲姟鍙�: {TaskNum}锛屼竴鍙蜂綅: {trayBarcode1}锛屼簩鍙蜂綅: {trayBarcode2}", task.RobotTaskNum,trayBarcode1,trayBarcode2);
+ QuartzLogger.Error($"璇诲彇鎵樼洏鏉$爜澶辫触,涓�鍙蜂綅锛歿trayBarcode1},浜屽彿浣嶏細{trayBarcode2}", stateForUpdate.RobotCrane.DeviceName);
// 鍙戦�佸彇璐ф寚浠� 鏍囪鎵爜NG锛屾斁璐ф椂涓嶄娇鐢ㄨ繖浜涙潯鐮侊紝骞舵斁鍏G鍙�
--
Gitblit v1.9.3