wangxinhui
21 小时以前 9d75314e88f8aac494d57715e3231fe3540cb867
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -78,6 +78,8 @@
        public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 100 && x < 500).ToList();
        public List<int> TaskRelocationTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 900 && x < 100).ToList();
        public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository) : base(BaseDal)
        {
            _mapper = mapper;
@@ -207,6 +209,17 @@
                        continue;
                    }
                    Dt_Task task = _mapper.Map<Dt_Task>(item);
                    if (task.TaskType == TaskTypeEnum.Relocation.ObjToInt())
                    {
                        task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                        task.CurrentAddress = item.SourceAddress;
                        task.NextAddress = item.TargetAddress;
                        task.DeviceCode = task.Roadway;
                        task.TaskType = TaskTypeEnum.Relocation.ObjToInt();
                        task.Creater = "WMS";
                        tasks.Add(task);
                        continue;
                    }
                    task.Creater = "WMS";
                    task.TaskState = (int)TaskStatusEnum.New;
                    task.CurrentAddress = item.SourceAddress;
@@ -817,6 +830,14 @@
        }
        /// <summary>
        /// æ ¹æ®è®¾å¤‡ç¼–号创建时间排序查询任务池移库任务
        /// </summary>
        public Dt_Task QueryStackerCraneRelocationTask(string deviceNo)
        {
            return BaseDal.QueryFirst(x => x.DeviceCode == deviceNo && TaskRelocationTypes.Contains(x.TaskType) && x.TaskState == (int)TaskStatusEnum.SC_Execute, TaskOrderBy);
        }
        /// <summary>
        /// æ ¹æ®è®¾å¤‡ç¼–号、当前地址按照优先级以及创建时间排序查询任务池出库类型的新增的任务
        /// </summary>
        /// <param name="deviceNo">设备编号</param>