From e6b190354191122069b1a0518f050d6504f7ec5e Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 11 二月 2026 15:29:39 +0800
Subject: [PATCH] 重构WMS服务并简化逻辑

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs
index 9991cd6..b52c966 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/QuartzNet/QuartzNetExtension.cs
@@ -47,7 +47,7 @@
                     {
                         try
                         {
-                            if (!x.DeviceName.Contains("鏈烘鎵�"))
+                            if (!x.DevicePlcType.Contains("Socket"))
                             {
                                 #region 杩炴帴PLC
 
@@ -93,7 +93,7 @@
                                 }).ToList();
 
                                 // 鏍规嵁璁惧绫诲瀷鑾峰彇璁惧鍗忚璇︽儏
-                                List<DeviceProtocolDetailDTO> deviceProtocolDetails = _deviceProtocolDetailService.GetDeviceProtocolDetailsByDeviceType(x.DeviceType);
+                                List<DeviceProtocolDetailDTO> deviceProtocolDetails = _deviceProtocolDetailService.GetDeviceProtocolDetailsByDeviceId(x.Id);
 
                                 // 鍔犺浇璁惧绋嬪簭闆�
                                 Assembly assemblyDevice = Assembly.Load($"WIDESEAWCS_QuartzJob");
@@ -121,14 +121,14 @@
                 });
                 for (int i = 0; i < dispatches.Count; i++)
                 {
-                    var targetDevice = deviceInfos.FirstOrDefault(x => x.Id == dispatches[i].Id);
+                    var targetDevice = deviceInfos.FirstOrDefault(x => x.DispatchId == dispatches[i].Id);
 
                     if (targetDevice is null) continue;
 
                     // 浣跨敤妯″紡鍖归厤
                     dispatches[i].JobParams = targetDevice switch
                     {
-                        { DeviceName: var name } when name.Contains("鏈烘鎵�")
+                        { DevicePlcType: var type } when type.Contains("Socket")
                             => new RobotCraneDevice { DeviceCode = targetDevice.DeviceCode, DeviceName = targetDevice.DeviceName, IPAddress = targetDevice.DeviceIp + ":" + targetDevice.DevicePort },
                         _ => targetDevice.Device
                     };

--
Gitblit v1.9.3