| | |
| | | AgvResponse agvResponse = new AgvResponse(); |
| | | try |
| | | { |
| | | if (secureApplyModel.ReceiveTaskID=="100") |
| | | { |
| | | return agvResponse.OK("æå", "0"); |
| | | } |
| | | var task = _taskRepository.QueryFirst(x => secureApplyModel.ReceiveTaskID.ObjToInt() == x.TaskNum); |
| | | if (task == null) throw new Exception("æªæ¾å°ä»»å¡"); |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | |
| | | } |
| | | else |
| | | { |
| | | if (task.TaskType == TaskTypeEnum.PrintInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintBackInbound.ObjToInt()) |
| | | if (task.TaskType == TaskTypeEnum.PrintYLInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintYLBackInbound.ObjToInt()) |
| | | { |
| | | var content = TakeFinish(task.CurrentAddress); |
| | | if (!content.Status) |
| | |
| | | { |
| | | throw new Exception($"{task.NextAddress}AGVç«å°æªå®ä¹"); |
| | | } |
| | | if (task.TaskType == TaskTypeEnum.PrintInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintBackInbound.ObjToInt()) |
| | | if (task.TaskType == TaskTypeEnum.PrintYLInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintYLBackInbound.ObjToInt()) |
| | | { |
| | | List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.NextAddress == x.StartPosi); |
| | | Dt_Router router = routers.FirstOrDefault(); |
| | |
| | | else |
| | | { |
| | | _taskService.TaskCompleted(task.TaskNum); |
| | | if (task.TaskType==TaskTypeEnum.PrintOutbound.ObjToInt()) |
| | | if (task.TaskType==TaskTypeEnum.PrintYLOutbound.ObjToInt()) |
| | | { |
| | | PutFinish(task.NextAddress); |
| | | } |