From 970d9c5c36d526a587138232ae9dae719dbcd16d Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 14 四月 2025 16:43:16 +0800
Subject: [PATCH] WCS添加获取设备信息

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs"
index dfe8b78..3514ad3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs"
@@ -11,7 +11,9 @@
 using WIDESEAWCS_Common.ShuttleCarEnum;
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Caches;
 using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_DTO.System;
 using WIDESEAWCS_DTO.WMSInfo;
 using WIDESEAWCS_IShuttleCar;
 using WIDESEAWCS_ITaskInfoRepository;
@@ -37,9 +39,10 @@
         private readonly IShuttleCarService _shuttleCarService;
         private readonly ITaskExecuteDetailService _taskExecuteDetailService;
         private readonly IRouterService _routerService;
+        private readonly ICacheService _cacheService;
         private readonly IMapper _mapper;
 
-        public CommonShuttleCarJob(ITaskService taskService, ITaskRepository taskRepository, ITaskHtyService taskHtyService, IShuttleCarService shuttleCarService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper)
+        public CommonShuttleCarJob(ITaskService taskService, ITaskRepository taskRepository, ITaskHtyService taskHtyService, IShuttleCarService shuttleCarService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, ICacheService cacheService, IMapper mapper)
         {
             _taskService = taskService;
             _taskRepository = taskRepository;
@@ -47,6 +50,7 @@
             _shuttleCarService = shuttleCarService;
             _taskExecuteDetailService = taskExecuteDetailService;
             _routerService = routerService;
+            _cacheService = cacheService;
             _mapper = mapper;
         }
 
@@ -59,6 +63,7 @@
                 {
                     shuttleCar.Communicator.IsReadAfterWrite = false;
                     ShuttleCarTaskCommandR command = ReadCustomer<ShuttleCarTaskCommandR>(shuttleCar, shuttleCar.DeviceCode);//璇诲彇绌挎杞︿俊鎭�
+                    _cacheService.AddOrUpdate(shuttleCar.DeviceCode, command);
                     if (command != null && command.JoinStatus == 1)
                     {
                         #region 绌挎杞︿换鍔″畬鎴�

--
Gitblit v1.9.3