wanshenmean
2 天以前 72c0f86c75c8a9a5eb7435d72b6ebece4c5382e8
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskSelector.cs
@@ -2,6 +2,7 @@
using Newtonsoft.Json;
using System.Diagnostics.CodeAnalysis;
using WIDESEA_Core;
using WIDESEAWCS_Common.Constants;
using WIDESEAWCS_Common.HttpEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
@@ -104,7 +105,7 @@
            //QuartzLogger.Info($"开始选择任务,设备: {deviceCode},上一任务类型: {commonStackerCrane.LastTaskType}", deviceCode);
            // 根据上一任务类型决定查询策略
            if (commonStackerCrane.LastTaskType == null)
            if (commonStackerCrane.LastTaskType == null || commonStackerCrane.LastTaskType == TaskRelocationTypeEnum.Relocation.GetHashCode())
            {
                // 没有上一任务类型,查询普通任务
                candidateTask = _taskService.QueryStackerCraneTask(deviceCode);
@@ -288,7 +289,7 @@
            if (task.TaskType == (int)TaskOutboundTypeEnum.OutEmpty)
            {
                // 空托盘出库
                taskType = 100;
                taskType = StackerCraneConst.EmptyPalletTaskType;
            }
            else
                taskType = task.TaskType;
@@ -320,8 +321,8 @@
            // 检查站台是否被占用
            bool isOccupied = conveyorLine.IsOccupied(router.ChildPosi);
            _logger.LogInformation("IsOutTaskStationAvailable:站台 {ChildPosi},是否被占用: {IsOccupied},任务号: {TaskNum}", router.ChildPosi, isOccupied, task.TaskNum);
            QuartzLogger.Info($"IsOutTaskStationAvailable:站台 {router.ChildPosi},是否被占用: {isOccupied}", task.Roadway);
            _logger.LogInformation("IsOutTaskStationAvailable:站台 {ChildPosi},是否被占用: {IsOccupied},任务号: {TaskNum}", router.ChildPosi, !isOccupied, task.TaskNum);
            QuartzLogger.Info($"IsOutTaskStationAvailable:站台 {router.ChildPosi},是否被占用: {!isOccupied}", task.Roadway);
            return isOccupied;
        }