| | |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(item.SourceAddress, item.TargetAddress); |
| | | Dt_Router routers = _routerService.QueryNextRoute(item.SourceAddress); |
| | | //暂不考虑多路径 |
| | | if (routers.Count > 0) |
| | | if (!routers.IsNullOrEmpty()) |
| | | { |
| | | task.TaskState = (int)TaskInStatusEnum.InNew; |
| | | task.CurrentAddress = item.SourceAddress; |
| | | task.NextAddress = routers.FirstOrDefault().ChildPosi; |
| | | task.NextAddress = routers.ChildPosi; |
| | | } |
| | | } |
| | | tasks.Add(task); |
| | |
| | | |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(tasks.Select(x => x.TaskNum).ToList(), "接收WMS任务"); |
| | | |
| | | content = WebResponseContent.Instance.OK("成功"); |
| | | content = WebResponseContent.Instance.OK("成功", tasks); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | task.TargetAddress = wmsTargetAddress; |
| | | task.CurrentAddress = task.NextAddress; |
| | | } |
| | | else |
| | | { |
| | | //_httpClientHelper.Post<WebResponseContent>(nameof(ConfigKey.GetTasksLocation), taskDto.ToJson(), nameof(ConfigKey.GetTasksLocation)); |
| | | //if (!result.IsSuccess && !result.Data.Status) |
| | | //{ |
| | | // return WebResponseContent.Instance.Error($"调用WMS接口获取任务目标地址失败,任务号:【{task.TaskNum}】,错误信息:【{content.Message}】"); |
| | | //} |
| | | } |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OtherGroup) |
| | | { |