From bd40cc9e7dd6352915568ce49baa4accd1d9645b Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期六, 18 四月 2026 14:23:35 +0800
Subject: [PATCH] feat: 添加机器人任务处理逻辑和消息去重功能
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs
index 040d024..7c82c8c 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/ApiRouteCacheWarmupHostedService.cs
@@ -27,7 +27,10 @@
(nameof(ConfigKey.RelocationFinishTask), "Task/RelocationFinishTask"),
(nameof(ConfigKey.CreateRobotGroupPalletTask), "Task/CreateRobotGroupPalletTask"),
(nameof(ConfigKey.CreateRobotChangePalletTask), "Task/CreateRobotChangePalletTask"),
- (nameof(ConfigKey.CreateRobotSplitPalletTask), "Task/CreateRobotSplitPalletTask")
+ (nameof(ConfigKey.CreateRobotSplitPalletTask), "Task/CreateRobotSplitPalletTask"),
+ (nameof(ConfigKey.OutboundFinishTaskTray), "Task/OutboundFinishTaskTray"),
+ (nameof(ConfigKey.SplitPalletConfirm), "Stock/SplitPalletConfirm"),
+ (nameof(ConfigKey.GroupPalletConfirm), "Stock/GroupPalletConfirm")
};
private readonly ICacheService _cache;
@@ -43,8 +46,16 @@
public Task StartAsync(CancellationToken cancellationToken)
{
+ const string cacheKey = $"{RedisPrefix.Code}";
+
+ _cache.RemoveByPrefix($"{cacheKey}");
+
+
+
const string cacheKeyPrefix = $"{RedisPrefix.Code}:{RedisName.API}:";
int warmedCount = 0;
+
+
foreach ((string configKey, string routePath) in ApiRouteMappings)
{
@@ -52,7 +63,7 @@
warmedCount++;
}
- _logger.LogInformation(":API路由缓存预热完成。计数={Count}", warmedCount);
+ _logger.LogInformation("API璺敱缂撳瓨棰勭儹瀹屾垚锛屽叡鍔犺浇={Count}涓矾鐢辨槧灏�", warmedCount);
return Task.CompletedTask;
}
--
Gitblit v1.9.3