| | |
| | | public string urlWMSTask = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlWMSTask"]; |
| | | public string urlTaskCompleted = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlTaskCompleted"]; |
| | | public string urlWMSMovelibraryTask = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlWMSMovelibraryTask"]; |
| | | public string urlRelocationTaskCompleted = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlRelocationTaskCompleted"]; |
| | | public string urlQueryinventory = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlQueryinventory"]; |
| | | public string urlEmptyOutbound = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlEmptyOutbound"]; |
| | | public string urlRawmaterialout = WIDESEAWCS_Core.Helper.AppSettings.Configuration["urlRawmaterialout"]; |
| | |
| | | /*List<Dt_Router> routers = _routerService.QueryNextRoutes(task.NextAddress, task.TargetAddress); |
| | | if (!routers.Any()) return WebResponseContent.Instance.Error($"æªæ¾å°è®¾å¤è·¯ç±ä¿¡æ¯");*/ |
| | | |
| | | content = HttpHelper.Get<WebResponseContent>($"{urlTaskCompleted}?TaskNum={task.TaskNum}"); |
| | | content = HttpHelper.Get<WebResponseContent>($"{urlTaskCompleted}?TaskNum={task.TaskNum}&HowWorks=2"); |
| | | task.TaskState = (int)TaskOutStatusEnum.OutFinish; |
| | | task.ModifyDate = DateTime.Now; |
| | | BaseDal.DeleteData(task); |
| | |
| | | } |
| | | else if (task.TaskType == (int)TaskInboundTypeEnum.Inbound && task.TaskState == (int)TaskInStatusEnum.SC_InExecuting) |
| | | { |
| | | content = HttpHelper.Get<WebResponseContent>($"{urlTaskCompleted}?TaskNum={task.TaskNum}"); |
| | | content = HttpHelper.Get<WebResponseContent>($"{urlTaskCompleted}?TaskNum={task.TaskNum}&HowWorks=2"); |
| | | //todo |
| | | //int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskInStatusEnum>(); |
| | | task.TaskState = (int)TaskInStatusEnum.InFinish; |
| | |
| | | } |
| | | else if (task.TaskType == (int)TaskRelocationTypeEnum.Relocation) |
| | | { |
| | | GenerateInv2 generate = new GenerateInv2() |
| | | /*GenerateInv2 generate = new GenerateInv2() |
| | | { |
| | | PalletCode = task.PalletCode, |
| | | SourceAddress = task.SourceAddress, |
| | | TargetAddress = task.TargetAddress |
| | | |
| | | }; |
| | | content = HttpHelper.Post<WebResponseContent>($"{urlRelocationTaskCompleted}", generate); |
| | | content = HttpHelper.Post<WebResponseContent>($"{urlTaskCompleted}", generate);*/ |
| | | content = HttpHelper.Get<WebResponseContent>($"{urlTaskCompleted}?TaskNum={task.TaskNum}&HowWorks=2"); |
| | | task.TaskState = (int)TaskOutStatusEnum.SC_OutFinish; |
| | | task.ModifyDate = DateTime.Now; |
| | | BaseDal.DeleteData(task); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public WebResponseContent ReceiveWCSTask(int tasknum) |
| | | { |
| | | Dt_Task tasks = BaseDal.QueryFirst(x => x.TaskNum == tasknum); |
| | | try |
| | | { |
| | | _task_HtyService.AddTaskHty(tasks); |
| | | BaseDal.DeleteData(tasks); |
| | | WriteLog.Write_Log("WMSæå¨å é¤ä»»å¡", "å 餿å", $"ç³è¯·å é¤çæ¡ç ï¼{tasks.TaskNum},æçæ¡ç ï¼{tasks.PalletCode}", new { ä¿¡æ¯ = "å 餿å" }); |
| | | return WebResponseContent.Instance.OK(); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteLog.Write_Log("WMSæå¨å é¤ä»»å¡","å é¤å¤±è´¥", $"ç³è¯·å é¤çæ¡ç ï¼{tasks.TaskNum},æçæ¡ç ï¼{tasks.PalletCode}", new { ä¿¡æ¯ = ex.Message }); |
| | | return WebResponseContent.Instance.Error(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |