wanshenmean
2025-03-20 047e8be481b2b626a5dbcc613b5f2e77323239be
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerStationJob/CommonStackerStationCraneJob.cs
@@ -192,6 +192,25 @@
            if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                if (task.TaskType == (int)TaskOutboundTypeEnum.Outbound)
                {
                    Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.Roadway == task.Roadway && x.stationLocation == task.TargetAddress);
                    IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManager.stationPLC);
                    if (device != null)
                    {
                        CommonConveyorLine_After conveyorLine = (CommonConveyorLine_After)device;
                        string str = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationManager.stationChildCode).Select(x => x.DeviceProAddress) + ".0";
                        conveyorLine.Communicator.Write(str, true);
                        return task;
                    }
                    else
                    {
                        _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到出库站台【{task.NextAddress}】对应的通讯对象,无法判断出库站台是否被占用");
                        return null;
                    }
                }
                else
                {
                // 检查当前出库任务站台是否允许放货
                var occupiedStation = OutTaskStationIsOccupied(task);
                if (occupiedStation == null)
@@ -204,6 +223,7 @@
                {
                    return task;
                }
                }
                if (task == null)
                {