1
刘磊
2026-03-05 f45293a0c3c9838567d6ff01eae53157a9ed5284
ÏîÄ¿´úÂë/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;