From 021edcd84d6601249e008141b3027549f864155f Mon Sep 17 00:00:00 2001 From: wanshenmean <cathay_xy@163.com> Date: 星期一, 11 十一月 2024 17:30:40 +0800 Subject: [PATCH] 24-11-11.01 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 40 ++++++++++++++++++++++------------------ 1 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs index ced741e..3bd8816 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs @@ -196,26 +196,30 @@ } } + #region 杈撻�佺嚎璇锋眰鍏ュ簱涓嬩竴鍦板潃 + /// <summary> /// 杈撻�佺嚎璇锋眰鍏ュ簱涓嬩竴鍦板潃 /// </summary> /// <param name="conveyorLine">杈撻�佺嚎瀹炰緥瀵硅薄</param> /// <param name="command">璇诲彇鐨勮姹備俊鎭�</param> /// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param> - public void RequestInNextAddress(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode) - { - Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); - if (task != null) - { - Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); - if (newTask != null) - { - ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(newTask); - taskCommand.InteractiveSignal = command.InteractiveSignal; - conveyorLine.SendCommand(taskCommand, childDeviceCode); - } - } - } + //public void RequestInNextAddress(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode) + //{ + // Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); + // if (task != null) + // { + // Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); + // if (newTask != null) + // { + // ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(newTask); + // taskCommand.InteractiveSignal = command.InteractiveSignal; + // conveyorLine.SendCommand(taskCommand, childDeviceCode); + // } + // } + //} + + #endregion /// <summary> /// 杈撻�佺嚎鍏ュ簱瀹屾垚 @@ -234,7 +238,7 @@ //conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, 0, childDeviceCode); WebResponseContent content = _taskService.UpdateTaskStatusToNext(task); - Console.Out.WriteLine(content.Serialize()); + //Console.Out.WriteLine(content.Serialize()); } } @@ -304,13 +308,11 @@ taskCommand.TargetAddress = 0; } - conveyorLine.SendCommand(taskCommand, childDeviceCode); ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true); content = _taskService.UpdateTaskStatusToNext(task); } } - /// <summary> /// 鐩戞祴绌烘墭鐩樺疄鐩樺嚭搴� @@ -332,7 +334,6 @@ } catch (Exception) { - } } @@ -345,6 +346,7 @@ if (tasks.Count < index) { #region 璋冪敤WMS鑾峰彇鍑哄簱浠诲姟 + WMSTaskDTO taskDTO = new WMSTaskDTO(); object dynamic = new { @@ -362,6 +364,7 @@ return; taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString()); + #endregion CreateAndSendTask(taskDTO); @@ -380,6 +383,7 @@ } return content; } + /// <summary> /// 杈撻�佺嚎浜や簰瀹屾垚 /// </summary> -- Gitblit v1.9.3