| | |
| | | { |
| | | try |
| | | { |
| | | if (task.TaskType == TaskTypeEnum.OutProduct.ObjToInt()) |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | task.CurrentAddress = GetAGVAddress(task.CurrentAddress); |
| | | else |
| | | task.NextAddress = GetAGVAddress(task.NextAddress); |
| | |
| | | }; |
| | | if (taskDTO.TaskTyp== "CPC") |
| | | { |
| | | taskDTO.Priority = (24 - DateTime.Now.Hour).ToString(); |
| | | taskDTO.Priority = task.Grade.ToString(); |
| | | } |
| | | if (task.GroupId.IsNotEmptyOrNull()) |
| | | { |
| | | taskDTO.GroupId=task.GroupId; |
| | | } |
| | | if (task.TaskType==TaskTypeEnum.OutMesRworkProduct.ObjToInt()) |
| | | { |
| | | taskDTO.Priority = "127"; |
| | | } |
| | | //åéAGVä»»å¡ |
| | | WebResponseContent content = _taskService.AgvSendTask(taskDTO, APIEnum.Agv_CPSendTask); |
| | |
| | | throw new Exception(content.Message); |
| | | if (taskDTO.TaskTyp == "CPC") |
| | | { |
| | | task.Dispatchertime = DateTime.Now; |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_Executing); |
| | | } |
| | | else |
| | | { |
| | | task.Dispatchertime = DateTime.Now; |
| | | _taskService.UpdateTask(task, TaskStatusEnum.AGV_Takeing); |
| | | } |
| | | Thread.Sleep(500); |