From 9429653e8def2729014b45c7c75ec76e9aa6685b Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 12 六月 2025 17:13:48 +0800
Subject: [PATCH] 优化堆垛机交互逻辑

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/GetStackerObject.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/GetStackerObject.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/GetStackerObject.cs"
index adf2ed8..cd1f3a1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/GetStackerObject.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/GetStackerObject.cs"
@@ -104,7 +104,7 @@
 
         private string GetStatus(string protocolParamType)
         {
-            List<DeviceProDTO> devicePros = _speStackerCrane.DeviceProDTOs.Where(x => x.DeviceProParamType == protocolParamType).ToList();
+            List<DeviceProDTO> devicePros = _speStackerCrane.DeviceProDTOs.Where(x => x.DeviceProParamName == protocolParamType).ToList();
             if (devicePros.Count == 0)
             {
                 throw new Exception("鏈幏鍙栧埌鍗忚淇℃伅");
@@ -113,7 +113,7 @@
             {
                 object readStatus = _speStackerCrane.Communicator.ReadAsObj(devicePros[i].DeviceProAddress, devicePros[i].DeviceDataType);
                 DeviceProtocolDetailDTO? deviceProtocolDetail = _speStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePros[i].DeviceProParamName) ?? throw new Exception();
-                deviceProtocolDetail = _speStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePros[i].DeviceProParamType && x.ProtocalDetailValue.Equals(readStatus.ToString()));
+                deviceProtocolDetail = _speStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePros[i].DeviceProParamName && x.ProtocalDetailValue.Equals(readStatus.ToString()));
                 if (deviceProtocolDetail != null)
                 {
                     return deviceProtocolDetail.ProtocolDetailType;

--
Gitblit v1.9.3