From 8c9ea4fb36c8d1c2b2d2d517d63504b90f530f8c Mon Sep 17 00:00:00 2001 From: 刘磊 <1161824510@qq.com> Date: 星期四, 19 十二月 2024 15:41:19 +0800 Subject: [PATCH] 同步,火警出库 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs | 42 +++++++++++++++++++++--------------------- 1 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs index dc00b0d..f38e6a1 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs @@ -166,7 +166,7 @@ } catch (Exception ex) { - Console.Out.WriteLine(nameof(CommonConveyorLine_AfterJob) + ":" + ex.ToString()); + Console.Out.WriteLine(nameof(CommonConveyorLine_GWJob) + ":" + ex.ToString()); } finally { @@ -321,32 +321,32 @@ RequestTime = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now).ToString("yyyy-MM-ddTHH:mm:ss.fffZ") }; - var MOMIpAddress = wmsBase + ipAddress; + var MOMIpAddress = wmsBase + ipAddress; - var result = HttpHelper.PostAsync(MOMIpAddress, trayCells.ToJsonString()).Result; - WriteInfo("鍏ョ珯鏍¢獙", $"銆恵childDeviceCode}銆戝叆绔欐牎楠岃姹傚弬鏁般�恵trayCells.ToJsonString()}銆�"); - WriteInfo("鍏ョ珯鏍¢獙", ""); - WriteInfo("鍏ョ珯鏍¢獙", $"銆恵childDeviceCode}銆戝叆绔欐牎楠岃繑鍥炲弬鏁般�恵result}銆�"); - ResultTrayCellsStatus result1 = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(result); - if (result1.Success || task.Remark != "NG") + var result = HttpHelper.PostAsync(MOMIpAddress, trayCells.ToJsonString()).Result; + WriteInfo("鍏ョ珯鏍¢獙", $"銆恵childDeviceCode}銆戝叆绔欐牎楠岃姹傚弬鏁般�恵trayCells.ToJsonString()}銆�"); + WriteInfo("鍏ョ珯鏍¢獙", ""); + WriteInfo("鍏ョ珯鏍¢獙", $"銆恵childDeviceCode}銆戝叆绔欐牎楠岃繑鍥炲弬鏁般�恵result}銆�"); + ResultTrayCellsStatus result1 = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(result); + if (result1.Success || task.Remark != "NG") + { + Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); + if (newTask != null) { - Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); - if (newTask != null) - { - ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(newTask); - conveyorLine.SendCommand(taskCommand, childDeviceCode); - conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); - } - } - else - { - ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); - taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationNGChildCode); + ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(newTask); conveyorLine.SendCommand(taskCommand, childDeviceCode); conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); - _taskService.UpdateTaskStatusToNext(task); } } + else + { + ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); + taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationNGChildCode); + conveyorLine.SendCommand(taskCommand, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); + _taskService.UpdateTaskStatusToNext(task); + } + } } -- Gitblit v1.9.3