1
wangxinhui
2025-06-10 3443d00c1c23f84d8559e802a27eb9ba7ff0858a
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs
@@ -200,6 +200,10 @@
                        {
                            _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: router.NextPosi);
                        }
                        else if (task.TargetAddress.Contains("SCUTL-002"))
                        {
                            _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: "1103", targetAddress: "1103");
                        }
                        else
                        {
                            _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: "1102", targetAddress: "1102");
@@ -248,7 +252,12 @@
                //}
            }
            catch { }
            if (_taskRepository.QueryFirst(x => x.DeviceCode == commonStackerCrane.DeviceCode && x.TaskState==TaskStatusEnum.SC_Executing.ObjToInt())!=null)
            {
                return null;
            }
            WriteDebug(commonStackerCrane.DeviceCode, $"璇诲彇鍒板綋鍓嶄换鍔″彿:{commonStackerCrane.CurrentTaskNum}");
            Dt_Task task;
            if (commonStackerCrane.LastTaskType == null)
            {
@@ -279,7 +288,7 @@
                if (OutTaskStationIsOccupied(task) == null)
                {
                    bool flag = false;
                    List<string> otherOutStaionCodes = _routerService.QueryNextRoutes(commonStackerCrane.DeviceCode, task.NextAddress).Select(x => x.ChildPosi).ToList();
                    List<string> otherOutStaionCodes = _routerService.QueryNextRoutes(commonStackerCrane.DeviceCode, task.NextAddress,task.TaskType).Select(x => x.ChildPosi).ToList();
                    List<Dt_Task> tasks = _taskService.QueryStackerCraneOutTasks(commonStackerCrane.DeviceCode, otherOutStaionCodes);
                    foreach (var item in tasks)
                    {