From 047e8be481b2b626a5dbcc613b5f2e77323239be Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期四, 20 三月 2025 14:27:36 +0800
Subject: [PATCH] 更新配置和任务处理逻辑

---
 CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
index bf61d3b..ad8822c 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -40,11 +40,13 @@
 using WIDESEAWCS_ITaskInfoService;
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_QuartzJob.DeviceBase;
 using WIDESEAWCS_QuartzJob.DTO;
 using WIDESEAWCS_QuartzJob.Repository;
 using WIDESEAWCS_QuartzJob.Service;
 using WIDESEAWCS_SignalR;
 using WIDESEAWCS_Tasks.ConveyorLineJob;
+using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
 using ICacheService = WIDESEAWCS_Core.Caches.ICacheService;
 using Platform = WIDESEAWCS_Model.Models.Platform;
 
@@ -117,7 +119,14 @@
                     List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode);
                     foreach (string childDeviceCode in childDeviceCodes)
                     {
-                        ConveyorLineTaskCommand_After command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode);
+                        ConveyorLineTaskCommand_After command = null;
+                        if (childDeviceCode == "2236")
+                        {
+                            var stationPLC = _stationManagerRepository.QueryFirst(x => x.stationType == 1 && x.stationChildCode == childDeviceCode).stationPLC;
+                            IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationPLC);
+                            CommonConveyorLine_After conveyorLine1 = (CommonConveyorLine_After)device;
+                            command = conveyorLine1.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode);
+                        }
 
                         if (command == null) continue;
                         if (command.ConveyorLineBarcode.Trim().Contains("\0")) command.ConveyorLineBarcode = "";

--
Gitblit v1.9.3