| | |
| | | // 设置下一个地址为第一个子位置 |
| | | task.NextAddress = routers.FirstOrDefault().ChildPosi; |
| | | } |
| | | else |
| | | { |
| | | QuartzLogger.WriteLogToFile("路由查找异常", $"起点:{item.SourceAddress},终点:{item.TargetAddress},任务号:{item.TaskNum}"); |
| | | return content.Error("未找到路由配置"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <returns></returns> |
| | | public Dt_Task QueryExecutingConveyorLineTask(string nextAddress, string Barcode) |
| | | { |
| | | return BaseDal.QueryFirst(x => (x.NextAddress == nextAddress || x.TargetAddress == nextAddress) && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting), TaskOrderBy); |
| | | return BaseDal.QueryFirst(x => x.PalletCode == Barcode && (x.NextAddress == nextAddress || x.TargetAddress == nextAddress) && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting), TaskOrderBy); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting) |
| | | { |
| | | if (!task.Roadway.Contains("GW") && task.TaskType != (int)TaskOutboundTypeEnum.InToOut) |
| | | if (!task.Roadway.Contains("GW") && task.TaskType != (int)TaskOutboundTypeEnum.InToOut && task.TaskType != (int)TaskOutboundTypeEnum.OutNG) |
| | | { |
| | | var routers = _routerService.QueryNextRoutes(task.NextAddress, task.TargetAddress); |
| | | if (!routers.Any()) return WebResponseContent.Instance.Error($"未找到设备路由信息"); |