huangxiaoqiang
2025-06-03 d0712fcf60aa1ef5ddfb8d18b583a742893a7aea
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -259,7 +259,7 @@
                    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")
                        if (platform.PlatCode == "2040" || platform.PlatCode == "2036" || platform.PlatCode == "2032" || platform.PlatCode == "2028" || platform.PlatCode == "2024")
                        {
                            Platform platformJZ = _platFormRepository.QueryFirst(x => x.PlatCode == "10086" && x.Status == "Active");
                            if (platformJZ != null)
@@ -285,10 +285,6 @@
                                    }
                                }
                            }
                            //else
                            //{
                            //    //ConsoleHelper.WriteErrorLine("静置空托不允许出料");
                            //}
                        }
                        else
                        {
@@ -392,7 +388,8 @@
                }
                else
                {
                    var taskInTray = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
                    //var taskInTray = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
                    var taskInTray = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode,command.Barcode);
                    if (taskInTray != null && taskInTray.TaskType == (int)TaskInboundTypeEnum.InTray)
                    {
                        RequestInNextAddress(conveyorLine, command, childDeviceCode, ProtocalDetailValue);
@@ -447,6 +444,7 @@
                                // 如果已有任务数量小于指定索引
                                if (tasks.Count < Location.Count)
                                {
                                    ConsoleHelper.WriteSuccessLine($"{childDeviceCode}");
                                    return childDeviceCode;
                                }
                                else
@@ -493,7 +491,8 @@
            _noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" });
            WriteInfo(conveyorLine.DeviceName, log);
            Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
            //Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
            Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode);
            if (task != null)
            {
                if (command.Barcode == task.PalletCode)
@@ -543,7 +542,8 @@
                _noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" });
                WriteInfo(conveyorLine.DeviceName, log);
                var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
                //var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
                var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode);
                if (task != null && task.TaskState != (int)TaskInStatusEnum.Line_InFinish)
                {
                    if (command.Barcode == task.PalletCode && childDeviceCode == task.NextAddress)
@@ -601,6 +601,7 @@
            {
                // 查询输送线任务,根据输送线设备和子设备代码获取任务信息
                var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode);
                //var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode, command.Barcode);
                // 输出成功信息,包括输送线名称、任务号、托盘条码和子设备代码,以及任务信息
                var logs = $"【{conveyorLine._deviceName}】任务号:【{command.TaskNum}】,托盘条码:【{command.Barcode}】已到达【{childDeviceCode}】输送线请求出库,task{task.ToJsonString()}";
@@ -665,7 +666,8 @@
            WriteInfo(conveyorLine.DeviceName, log);
            // 查询正在执行的输送线任务,根据任务号和子设备代码获取任务信息
            Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
            //Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
            Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode);
            // 如果任务存在
            if (task != null)
@@ -726,7 +728,8 @@
                WriteInfo(conveyorLine.DeviceName, logs);
                // 查询正在执行的输送线任务
                var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
                //var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
                var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode);
                // 如果任务存在
                if (task != null)