From 9b567a8304c3d202ddd1f716cb63c2a4535b6417 Mon Sep 17 00:00:00 2001 From: 肖洋 <cathay_xy@163.com> Date: 星期一, 09 十二月 2024 22:47:06 +0800 Subject: [PATCH] 高温出库堆垛机完成给线体写入托盘号 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs | 40 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 39 insertions(+), 1 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs index 6420913..359b548 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs @@ -93,7 +93,6 @@ var result = await HttpHelper.PostAsync(wmsIpAddrss, new { palletCode = palletCode, EquiCodeMOM = stationManager.stationEquipMOM, Roadways = stationManager.Roadway, area = stationManager.stationArea, Position = stationManager.stationChildCode }.ToJsonString()); content = JsonConvert.DeserializeObject<WebResponseContent>(result); - if (!content.Status) { // wms澶辫触杩斿洖鍘籒G鍙d换鍔� @@ -103,6 +102,7 @@ } var task = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString()); + ConsoleHelper.WriteSuccessLine(content.Data.ToString()); return ReceiveByWMSTask(task); } catch (Exception ex) @@ -159,6 +159,44 @@ return content; } + /// <summary> + /// 楂樻俯鍑哄簱 + /// </summary> + /// <param name="taskDTO"></param> + /// <returns></returns> + public WebResponseContent ReceiveByWMSGWTask([NotNull] WMSTaskDTO taskDTO) + { + WebResponseContent content = new WebResponseContent(); + try + { + if (BaseDal.QueryFirst(x => x.TaskNum == taskDTO.TaskNum || x.PalletCode == taskDTO.PalletCode) != null) + { + return content.OK(); + } + Dt_Task task = _mapper.Map<Dt_Task>(taskDTO); + task.Creater = "WMS"; + + if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) + { + task.TaskState = (int)TaskOutStatusEnum.OutNew; + task.CurrentAddress = taskDTO.RoadWay; + task.NextAddress = "002-000-002"; + task.SourceAddress = taskDTO.SourceAddress; + task.TargetAddress = taskDTO.TargetAddress; + } + BaseDal.AddData(task); + + _taskExecuteDetailService.AddTaskExecuteDetail(task.WMSId, "鎺ユ敹WMS浠诲姟"); + + content = WebResponseContent.Instance.OK("鎴愬姛"); + } + catch (Exception ex) + { + content = WebResponseContent.Instance.Error($"浠诲姟鎺ユ敹閿欒,閿欒淇℃伅:{ex.Message}"); + } + return content; + } + /// <summary> /// 鎺ユ敹WMS浠诲姟淇℃伅 -- Gitblit v1.9.3