wanshenmean
2025-04-16 29f20b28392d212c04c0c40a512894f8622cfa53
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -256,7 +256,7 @@
                    }
                    // 查询平台信息
                    Platform platform = _platFormRepository.QueryFirst(x => x.PLCCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
                    Platform platform = _platFormRepository.QueryFirst(x => x.DeviceCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
                    if (platform != null && !string.IsNullOrEmpty(platform.Location))
                    {
                        if (platform.PlatCode == "1299" || platform.PlatCode == "1295" || platform.PlatCode == "1291" || platform.PlatCode == "1287" || platform.PlatCode == "1283")
@@ -357,8 +357,18 @@
                    }
                    else
                    {
                        // 获取任务的下一目标地址
                        var next = task.NextAddress;
                        if (task.Roadway.Contains("JZ"))
                        {
                            if (StaticVariable.isStackerRun)
                            {
                                StaticVariable.isLineRun = false;
                                ExecuteConveyorLineTask(conveyorLine, command, ProtocalDetailValue, childDeviceCode);
                            }
                        }
                        else
                        {
                            // 获取任务的下一目标地址
                            var next = task.NextAddress;
                        // 将任务映射为命令
                        var taskCommand = MapTaskCommand(task, command);
                        // 恢复任务的下一目标地址
@@ -377,6 +387,7 @@
                        ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
                        // 更新任务状态为下一状态
                        _taskService.UpdateTaskStatusToNext(task);
                        }
                    }
                }
                else
@@ -407,6 +418,10 @@
                // 捕获并输出异常信息
                Console.Out.WriteLine(ex.ToString());
            }
            finally
            {
                StaticVariable.isLineRun = true;
            }
        }
        public string RequestInboundPlatform(string childDeviceCode, string productLine, bool IsTrayBarcode)
@@ -418,7 +433,7 @@
                if (platform != null && !string.IsNullOrEmpty(platform.Location))
                {
                    var Location = platform.Location.Split(',').ToList();
                    IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == platform.PLCCode);
                    IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == platform.DeviceCode);
                    if (device != null)
                    {
                        CommonConveyorLine conveyorLine = (CommonConveyorLine)device;