|  |  |  | 
|---|
|  |  |  | using System.Threading.Tasks; | 
|---|
|  |  |  | using WIDESEAWCS_Common; | 
|---|
|  |  |  | using WIDESEAWCS_Common.TaskEnum; | 
|---|
|  |  |  | using WIDESEAWCS_Common.WareHouseEnum; | 
|---|
|  |  |  | using WIDESEAWCS_Core.Helper; | 
|---|
|  |  |  | using WIDESEAWCS_IBasicInfoRepository; | 
|---|
|  |  |  | using WIDESEAWCS_ITaskInfoRepository; | 
|---|
|  |  |  | 
|---|
|  |  |  | ////夿AGVä»»å¡å®æï¼ååç»å°é¢ç«åè´§å®æ | 
|---|
|  |  |  | //device.SetValue(GroundStationDBName.W_TakeRequest, false, item.StationCode); | 
|---|
|  |  |  | //device.SetValue(GroundStationDBName.W_TakeFinish, false, item.StationCode); | 
|---|
|  |  |  | Dt_Task task = _taskRepository.QueryFirst(x => x.DeviceCode == item.StackerCraneCode && x.TaskState == TaskStatusEnum.SC_Execute.ObjToInt() && string.IsNullOrEmpty(x.NextAddress)); | 
|---|
|  |  |  | if (task != null && isCanPut && !isCanTake && !putRequest && !putFinish && !takeRequest && !takeFinish) | 
|---|
|  |  |  | Dt_Task task = _taskRepository.QueryFirst(x => x.DeviceCode == item.StackerCraneCode && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.NextAddress==item.StationCode); | 
|---|
|  |  |  | Dt_Task? taskOther = _taskRepository.QueryFirst(x => x.Roadway == item.StackerCraneCode && (x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt() || x.TaskState == TaskStatusEnum.SC_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.AGV_Executing.ObjToInt() || x.TaskState == TaskStatusEnum.AGV_WaitToExecute.ObjToInt() || x.TaskState == TaskStatusEnum.Exception.ObjToInt())); | 
|---|
|  |  |  | if (task != null && isCanPut && !isCanTake && !putRequest && !putFinish && !takeRequest && !takeFinish && taskOther == null) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, nextAddress: item.StationCode); | 
|---|
|  |  |  | _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, nextAddress: item.StackerCraneStationCode); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()) | 
|---|