1
zhangchengsong
14 小时以前 4d7c377173784d6ec495b2c4178395a65f4e2a76
ÏîÄ¿´úÂë/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -257,12 +257,9 @@
        {
            try
            {
                CommonConveyorLine? conveyorLine = null;
                lock (Storage.Devices)
                {
                    CommonConveyorLine? conveyorLine = null;
                    string deviceCode = Roadway == "C" ? "1004" : "1003";
                    conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceCode == deviceCode) as CommonConveyorLine;
                }
                if (conveyorLine == null) return false;
                DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == NextAddress && x.DeviceProParamName == "StationNum");
@@ -291,11 +288,8 @@
            {
                CommonConveyorLine? conveyorLine = null;
                lock (Storage.Devices)
                {
                    string deviceCode = Roadway == "C" ? "1004" : "1003";
                    conveyorLine = Storage.Devices.FirstOrDefault(x => x.DeviceCode == deviceCode) as CommonConveyorLine;
                }
                if (conveyorLine == null) return false;
                DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == SourceAddress && x.DeviceProParamName == "StationNum");
@@ -305,7 +299,7 @@
                int StationNum = conveyorLine.Communicator.Read<ushort>(deviceProDTO.DeviceProAddress);
                int HandShake = conveyorLine.Communicator.Read<ushort>(HandShakeprodto.DeviceProAddress);
                WriteLog.Write_Log("入库库口状态信息", "入库库口状态信息", $"库口是【{SourceAddress}】,申请状态地址:【{HandShakeprodto.DeviceProAddress}】,读取的数据:【{HandShake}】\n库口是否有货状态地址:【{deviceProDTO.DeviceProAddress}】,读取的数据【{StationNum}】");
                return (StationNum == 1 && HandShake == 0) ? true : false;
                return StationNum == 1;
            }
            catch (Exception ex)
            {