wanshenmean
2026-03-04 17e5dbd7bd0364e27a33f1a7dab91cf33d5dcabc
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
@@ -11,6 +11,7 @@
using WIDESEAWCS_DTO.BasicInfo;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_Common;
using ICacheService = WIDESEAWCS_Core.Caches.ICacheService;
namespace WIDESEAWCS_QuartzJob.Service
@@ -330,10 +331,9 @@
        {
            // 创建一个字符串列表,用于存储所有位置
            List<string> positions = new List<string>();
            var device = _cacheService.Get<List<string>>($"DevicePositions:{deviceCode}");
            var device = _cacheService.Get<List<string>>($"{RedisPrefix.System}:{RedisName.DevicePositions}:{deviceCode}");
            if (device.IsNullOrEmpty())
            {
                try
                {
                    // 查询所有进入路由器的位置
@@ -352,6 +352,10 @@
                {
                }
                finally
                {
                    _cacheService.TryAdd($"{RedisPrefix.System}:{RedisName.DevicePositions}:{deviceCode}", positions);
                }
            }
            else 
                positions = device;