| | |
| | | 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 |
| | |
| | | { |
| | | // 创建一个字符串列表,用于存储所有位置 |
| | | 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 |
| | | { |
| | | // 查询所有进入路由器的位置 |
| | |
| | | { |
| | | |
| | | } |
| | | finally |
| | | { |
| | | _cacheService.TryAdd($"{RedisPrefix.System}:{RedisName.DevicePositions}:{deviceCode}", positions); |
| | | } |
| | | } |
| | | else |
| | | positions = device; |