| | |
| | | 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; |
| | |
| | | Dt_Task? candidateTask; |
| | | var deviceCode = commonStackerCrane.DeviceCode; |
| | | |
| | | _logger.LogInformation("SelectTask:开始选择任务,设备: {DeviceCode},上一任务类型: {LastTaskType}", deviceCode, commonStackerCrane.LastTaskType); |
| | | QuartzLogger.Info($"开始选择任务,设备: {deviceCode},上一任务类型: {commonStackerCrane.LastTaskType}", deviceCode); |
| | | //_logger.LogInformation("SelectTask:开始选择任务,设备: {DeviceCode},上一任务类型: {LastTaskType}", deviceCode, commonStackerCrane.LastTaskType); |
| | | //QuartzLogger.Info($"开始选择任务,设备: {deviceCode},上一任务类型: {commonStackerCrane.LastTaskType}", deviceCode); |
| | | |
| | | // 根据上一任务类型决定查询策略 |
| | | if (commonStackerCrane.LastTaskType == null) |
| | |
| | | if (task.TaskType == (int)TaskOutboundTypeEnum.OutEmpty) |
| | | { |
| | | // 空托盘出库 |
| | | taskType = 100; |
| | | taskType = StackerCraneConst.EmptyPalletTaskType; |
| | | } |
| | | else |
| | | taskType = task.TaskType; |
| | |
| | | _logger.LogInformation("IsOutTaskStationAvailable:站台 {ChildPosi},是否被占用: {IsOccupied},任务号: {TaskNum}", router.ChildPosi, isOccupied, task.TaskNum); |
| | | QuartzLogger.Info($"IsOutTaskStationAvailable:站台 {router.ChildPosi},是否被占用: {isOccupied}", task.Roadway); |
| | | |
| | | return !isOccupied; |
| | | return isOccupied; |
| | | } |
| | | } |
| | | } |