1
hutongqing
2025-01-10 820c23dcc1d6464db9bae3e46554cf49e1bdbb0e
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ÓÍÄ«²Ö/CommonHoisterJob.cs
@@ -48,7 +48,7 @@
                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == hoister.DeviceCode);
                    if (stationMangers == null || stationMangers.Count == 0)
                    {
                        WriteInfo(hoister.DeviceName, "未找到对应站台信息");
                        WriteError(hoister.DeviceName, "未找到对应站台信息");
                        return Task.CompletedTask;
                    }
@@ -68,7 +68,7 @@
                            if (task != null)
                            {
                                bool isWrite = hoister.SetValue(HoisterDBName.RequestIn, true, deviceChildCode);
                                WriteInfo(hoister.DeviceName, $"请求入库,设备编号:{deviceChildCode},任务号:{task.TaskNum}");
                                WriteError(hoister.DeviceName, $"请求入库,设备编号:{deviceChildCode},任务号:{task.TaskNum}");
                            }
                        }
                        else if (!leisure && tray && requestIn && inbounding && !requestOut && !outbounding)
@@ -79,13 +79,13 @@
                                Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == deviceChildCode);
                                if (stationManger == null)
                                {
                                    WriteInfo(hoister.DeviceName, $"未找到对应站台信息,设备编号:{deviceChildCode},任务号:{task.TaskNum}");
                                    WriteError(hoister.DeviceName, $"未找到对应站台信息,设备编号:{deviceChildCode},任务号:{task.TaskNum}");
                                    break;
                                }
                                string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
                                if (string.IsNullOrEmpty(locationCode))
                                {
                                    WriteInfo(hoister.DeviceName, $"请求分配货位返回信息错误,设备编号:{deviceChildCode},任务号:{task.TaskNum}");
                                    WriteError(hoister.DeviceName, $"请求分配货位返回信息错误,设备编号:{deviceChildCode},任务号:{task.TaskNum}");
                                    break;
                                }
                                task.CurrentAddress = stationManger.StackerCraneStationCode;
@@ -99,7 +99,7 @@
                            }
                            else
                            {
                                WriteInfo(hoister.DeviceName, $"未找到对应任务信息,{deviceChildCode}");
                                WriteError(hoister.DeviceName, $"未找到对应任务信息,{deviceChildCode}");
                            }
                        }
                        else if (leisure && !tray && !requestIn && !inbounding && !requestOut && !outbounding)
@@ -108,7 +108,7 @@
                            if (task != null)
                            {
                                bool isWrite = hoister.SetValue(HoisterDBName.RequestOut, true, deviceChildCode);
                                WriteInfo(hoister.DeviceName, $"请求出库,设备编号:{deviceChildCode},任务号:{task.TaskNum}");
                                WriteError(hoister.DeviceName, $"请求出库,设备编号:{deviceChildCode},任务号:{task.TaskNum}");
                            }
                        }
                        else if (!leisure && !tray && !requestIn && !inbounding && requestOut && outbounding)
@@ -119,7 +119,7 @@
                                Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == deviceChildCode);
                                if (stationManger == null)
                                {
                                    WriteInfo(hoister.DeviceName, $"未找到对应站台信息,设备编号:{deviceChildCode},任务号:{task.TaskNum}");
                                    WriteError(hoister.DeviceName, $"未找到对应站台信息,设备编号:{deviceChildCode},任务号:{task.TaskNum}");
                                    break;
                                }
@@ -133,7 +133,7 @@
                            }
                            else
                            {
                                WriteInfo(hoister.DeviceName, $"未找到对应站台信息,{deviceChildCode}");
                                WriteError(hoister.DeviceName, $"未找到对应站台信息,{deviceChildCode}");
                            }
                        }
                    }