wangxinhui
2025-02-28 f947d43adfe6a204b6afe920ce88a30d78015f1d
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/StackerCraneJob_BC.cs
@@ -200,7 +200,7 @@
                        }
                        else
                        {
                            _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: "1102");
                            _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: "1102", targetAddress: "1102");
                        }
                        
                    }
@@ -336,13 +336,22 @@
                else
                {
                    Dt_Task reloTask = _mapper.Map<Dt_Task>(taskDTO);
                    reloTask.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                    reloTask.CurrentAddress = taskDTO.SourceAddress;
                    reloTask.NextAddress = taskDTO.TargetAddress;
                    reloTask.DeviceCode = task.DeviceCode;
                    reloTask.TaskType = TaskTypeEnum.Relocation.ObjToInt();
                    int taskId = _taskRepository.AddData(reloTask);
                    reloTask.TaskId = taskId;
                    //鍒ゆ柇绉诲簱璐т綅浠诲姟鏄惁宸插瓨鍦紝濡傚瓨鍦ㄥ厛鎵ц
                    Dt_Task existTask = _taskService.QueryStackerExistTask(reloTask.PalletCode, reloTask.SourceAddress);
                    if (existTask != null)
                    {
                        return existTask;
                    }
                    else
                    {
                        reloTask.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                        reloTask.CurrentAddress = taskDTO.SourceAddress;
                        reloTask.NextAddress = taskDTO.TargetAddress;
                        reloTask.DeviceCode = task.DeviceCode;
                        reloTask.TaskType = TaskTypeEnum.Relocation.ObjToInt();
                        int taskId = _taskRepository.AddData(reloTask);
                        reloTask.TaskId = taskId;
                    }
                    return reloTask;
                }