| | |
| | | { |
| | | public partial class TaskService |
| | | { |
| | | public async Task<WebResponseContent> TaskCompleted(int taskNum) |
| | | { |
| | | try |
| | | { |
| | | Dt_Task task = await Repository.QueryFirstAsync(x => x.TaskNum == taskNum); |
| | | if (task == null) |
| | | { |
| | | return await Task.FromResult(WebResponseContent.Instance.Error($"æªæ¾å°ä»»å¡ä¿¡æ¯")); |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | return await Task.FromResult(InboundTaskCompleted(task)); |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | { |
| | | return await Task.FromResult(OutboundTaskCompleted(task)); |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup) |
| | | { |
| | | return await Task.FromResult(RelocationTaskCompleted(task)); |
| | | } |
| | | else |
| | | { |
| | | return await Task.FromResult(WebResponseContent.Instance.Error($"æªæ¾å°è¯¥ç±»åä»»å¡,ä»»å¡ç±»å:{task.TaskType}")); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return await Task.FromResult(WebResponseContent.Instance.Error(ex.Message)); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡ä¿¡æ¯æ¨éè³WCS |
| | | /// </summary> |
| | |
| | | Dt_Task wmsTask = BaseDal.QueryFirst(x=>x.TaskNum == task.TaskNum); |
| | | if (wmsTask != null) |
| | | { |
| | | wmsTask.PalletCode= task.PalletCode; |
| | | wmsTask.Roadway = task.Roadway; |
| | | wmsTask.ContainerNo= task.PalletCode; |
| | | wmsTask.RoadwayNo = task.Roadway; |
| | | wmsTask.TaskStatus = task.TaskState; |
| | | wmsTask.CurrentAddress = task.CurrentAddress; |
| | | wmsTask.NextAddress = task.NextAddress; |