wanshenmean
13 小时以前 f319fd5d5e5e0332c4c7e209df64c351dfbe6887
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
@@ -185,8 +185,8 @@
                                if (command.CV_State == 2)
                                {
                                    // 检查该位置是否已有任务
                                    var existingTask = _taskService.Db.Queryable<Dt_Task>().First(x => x.TargetAddress == childDeviceCode);
                                    if (existingTask.IsNullOrEmpty())
                                    var existingTask = _taskService.Db.Queryable<Dt_Task>().Count(x => x.TargetAddress == childDeviceCode);
                                    if (existingTask < 5)
                                    {
                                        // 没有任务,向 WMS 请求出库托盘任务
                                        var position = checkPalletPositions.FirstOrDefault(x => x.Code == childDeviceCode);
@@ -268,6 +268,7 @@
                                    ProcessTaskState(conveyorLine, command, task, childDeviceCode);
                                    continue;
                                }
                                // Todo: 下面的逻辑主要处理没有查询到任务但有条码的情况,可能是需要生成机械手任务或者调用 WMS 创建入库任务 (临时使用)
                                else if (!command.Barcode.IsNullOrEmpty() && childDeviceCode == "11068")
                                {
                                    var isWcsTask = _taskService.Db.Queryable<Dt_Task>().Any(x => x.PalletCode == command.Barcode && (x.TaskStatus == (int)TaskOutStatusEnum.OutNew || x.TaskStatus == (int)TaskInStatusEnum.InNew));