| | |
| | | task.NextAddress = routers.FirstOrDefault().ChildPosi; |
| | | } |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup) |
| | | { |
| | | task.TaskState = item.SourceIsPickPlace ? TaskRelocationStatusEnum.CarSource_Finish.ObjToInt() : TaskRelocationStatusEnum.RelocationNew.ObjToInt(); |
| | | } |
| | | tasks.Add(task); |
| | | } |
| | | BaseDal.AddData(tasks); |
| | |
| | | { |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum); |
| | | if (task == null) return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥ä»»å¡ä¿¡æ¯,ä»»å¡å·:ã{taskNum}ã"); |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | { |
| | | task.TaskState = (int)TaskOutStatusEnum.OutPending; |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | task.TaskState = (int)TaskInStatusEnum.InPending; |
| | | } |
| | | //if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | //{ |
| | | // task.TaskState = (int)TaskOutStatusEnum.OutPending; |
| | | //} |
| | | //else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | //{ |
| | | // task.TaskState = (int)TaskInStatusEnum.InPending; |
| | | //} |
| | | task.ExceptionMessage = message; |
| | | task.ModifyDate = DateTime.Now; |
| | | BaseDal.UpdateData(task); |
| | |
| | | /// <param name="TaskState"></param> |
| | | /// <param name="TaskType"></param> |
| | | /// <returns></returns> |
| | | public Dt_Task GetTaskState(int TaskState, int TaskType) |
| | | public Dt_Task? GetTaskState(int TaskState, int TaskType) |
| | | { |
| | | Dt_Task task = null; |
| | | Dt_Task? task = null; |
| | | if (TaskState > 0 && TaskType > 0) |
| | | task = BaseDal.QueryFirst(x => x.TaskState == TaskState && x.TaskType == TaskType); |
| | | else if (TaskState > 0) |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(SourceAddress) && SourceAddress != "") |
| | | { |
| | | Dt_Task? task = BaseDal.QueryFirst(x => x.SourceAddress == SourceAddress && (x.TaskType == TaskOtherTypeEnum.RelocationCar.ObjToInt() || x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt())); |
| | | Dt_Task? task = BaseDal.QueryFirst(x => x.SourceAddress == SourceAddress && |
| | | x.ShuttleCarCode == ShuttleCarCode && |
| | | (x.TaskType == TaskOtherTypeEnum.RelocationCar.ObjToInt() || |
| | | x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt())); |
| | | if (task != null) return; |
| | | } |
| | | if (!string.IsNullOrEmpty(TargetAddress) && TargetAddress != "") |
| | | { |
| | | Dt_Task? task = BaseDal.QueryFirst(x => x.TargetAddress == TargetAddress && (x.TaskType == TaskOtherTypeEnum.RelocationCar.ObjToInt() || x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt())); |
| | | Dt_Task? task = BaseDal.QueryFirst(x => x.TargetAddress == TargetAddress && |
| | | (x.TaskType == TaskOtherTypeEnum.RelocationCar.ObjToInt() || |
| | | x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt())); |
| | | if (task != null) return; |
| | | } |
| | | #region å建å åæºç§»è½¦ä»»å¡ |