From c0d5e7c40f87c18fc7c53ffd810069d0b41cb849 Mon Sep 17 00:00:00 2001
From: 陈勇 <竞男@ASUNA>
Date: 星期五, 20 三月 2026 16:47:48 +0800
Subject: [PATCH] 同步

---
 项目代码/WCS/WCSServer/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs |   33 ++++++++++++++++++---------------
 1 files changed, 18 insertions(+), 15 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServer/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServer/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs"
index 1ffbf17..3dabe4e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServer/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServer/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs"
@@ -306,25 +306,28 @@
         {
             if (Communicator.IsConnected)
             {
-                List<DeviceProDTO> devicePros = _deviceProDTOs.Where(x => x.DeviceChildCode == deviceChildCode && x.DeviceProParamName == "RequestPut").ToList();
-                if (devicePros.Count == 0)
+                var devicePro = _deviceProDTOs.Where(x => x.DeviceChildCode == deviceChildCode && x.DeviceProParamName == "AllowPut").FirstOrDefault();
+                if (devicePro == null)
                 {
                     //todo 鍗忚淇℃伅鏈幏鍙栧埌鏃舵姏鍑哄紓甯�
-                    throw new Exception();
+                    throw new Exception($"{deviceChildCode}鍗忚淇℃伅鏈壘鍒�");
                 }
 
-                for (int i = 0; i < devicePros.Count; i++)
-                {
-                    object readStatus = Communicator.ReadAsObj(devicePros[i].DeviceProAddress, devicePros[i].DeviceDataType);
-                    //todo 鍗忚鏄庣粏淇℃伅鏈幏鍙栧埌鏃舵姏鍑哄紓甯�
-                    DeviceProtocolDetailDTO? deviceProtocolDetail = _deviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == deviceChildCode) ?? throw new Exception();
-                    deviceProtocolDetail = _deviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == deviceChildCode && x.ProtocalDetailValue.Equals(readStatus.ToString()));
-                    if (deviceProtocolDetail != null)
-                    {
-                        return true;
-                    }
-                    return false;
-                }
+                object readStatus = Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType);
+
+
+                //for (int i = 0; i < devicePros.Count; i++)
+                //{
+                //    object readStatus = Communicator.ReadAsObj(devicePros[i].DeviceProAddress, devicePros[i].DeviceDataType);
+                //    //todo 鍗忚鏄庣粏淇℃伅鏈幏鍙栧埌鏃舵姏鍑哄紓甯�
+                //    DeviceProtocolDetailDTO? deviceProtocolDetail = _deviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == deviceChildCode) ?? throw new Exception();
+                //    deviceProtocolDetail = _deviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == deviceChildCode && x.ProtocalDetailValue.Equals(readStatus.ToString()));
+                //    if (deviceProtocolDetail != null)
+                //    {
+                //        return true;
+                //    }
+                //    return false;
+                //}
             }
             //todo 閫氳鏈繛鎺ユ椂鎶涘嚭寮傚父
             return false;

--
Gitblit v1.9.3