| | |
| | | Dt_Task task = null; |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | if (string.IsNullOrEmpty(currentAddress)) |
| | | tasks = BaseDal.QueryData(x => x.Roadway == deviceNo && TaskRelocationTypes.Contains(x.TaskType) && x.TaskState < TaskRelocationStatusEnum.SC_RelocationExecuting.ObjToInt()).OrderBy(x => x.TaskNum).ToList(); |
| | | tasks = BaseDal.QueryData(x => x.Roadway == deviceNo && TaskRelocationTypes.Contains(x.TaskType) && x.TaskState < TaskRelocationStatusEnum.SC_RelocationFinish.ObjToInt()).OrderBy(x => x.TaskNum).ToList(); |
| | | else |
| | | tasks = BaseDal.QueryData(x => x.Roadway == deviceNo && x.CurrentAddress == currentAddress && TaskRelocationTypes.Contains(x.TaskType) && x.TaskState < TaskRelocationStatusEnum.SC_RelocationExecuting.ObjToInt()).OrderBy(x => x.TaskNum).ToList(); |
| | | tasks = BaseDal.QueryData(x => x.Roadway == deviceNo && x.CurrentAddress == currentAddress && TaskRelocationTypes.Contains(x.TaskType) && x.TaskState < TaskRelocationStatusEnum.SC_RelocationFinish.ObjToInt()).OrderBy(x => x.TaskNum).ToList(); |
| | | if (tasks != null && tasks.Count > 0) |
| | | { |
| | | task = tasks.First(); |
| | |
| | | return content = WebResponseContent.Instance.Error($"该任å¡ç¶æä¸å¯è·³è½¬å°ä¸ä¸æ¥,ä»»å¡å·:ã{task.TaskNum}ã,ä»»å¡ç¶æ:ã{task.TaskState}ã"); |
| | | } |
| | | int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskRelocationStatusEnum>(); |
| | | task.TaskState = nextStatus; |
| | | if (task.SourceIsPickPlace && task.TaskState == TaskRelocationStatusEnum.RelocationNew.ObjToInt()) |
| | | task.TaskState = TaskRelocationStatusEnum.SC_RelocationExecuting.ObjToInt(); |
| | | else |
| | | task.TaskState = nextStatus; |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OtherGroup)//åºå
移车 |
| | | { |