From 8c8532db8fc7fa76b7fe4c254a36d67c6af24ace Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期三, 11 六月 2025 14:46:33 +0800 Subject: [PATCH] 添加物料编码字段并更新查询逻辑 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 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 ba4df09..22efbda 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs @@ -382,7 +382,8 @@ _noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" }); WriteInfo(conveyorLine.DeviceName, log); - Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); + //Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); + Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode); if (task != null) { if (command.Barcode == task.PalletCode) @@ -403,6 +404,7 @@ WriteInfo(conveyorLine.DeviceName, logs); conveyorLine.SendCommand(taskCommand, childDeviceCode); + _taskService.UpdateData(newTask); } } } @@ -427,7 +429,8 @@ _noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" }); WriteInfo(conveyorLine.DeviceName, log); - var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); + //var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); + var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode); if (task != null && task.TaskState != (int)TaskInStatusEnum.Line_InFinish) { if (command.Barcode == task.PalletCode && childDeviceCode == task.NextAddress) @@ -549,7 +552,8 @@ WriteInfo(conveyorLine.DeviceName, log); // 鏌ヨ姝e湪鎵ц鐨勮緭閫佺嚎浠诲姟锛屾牴鎹换鍔″彿鍜屽瓙璁惧浠g爜鑾峰彇浠诲姟淇℃伅 - Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); + //Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); + Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode); // 濡傛灉浠诲姟瀛樺湪 if (task != null) @@ -584,6 +588,8 @@ // 鏍囪杈撻�佺嚎鍙戦�佷换鍔″畬鎴� ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true); + + _taskService.UpdateData(newTask); } } } @@ -607,7 +613,8 @@ WriteInfo(conveyorLine.DeviceName, logs); // 鏌ヨ姝e湪鎵ц鐨勮緭閫佺嚎浠诲姟 - var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); + //var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); + var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode); // 濡傛灉浠诲姟瀛樺湪 if (task != null) @@ -787,6 +794,9 @@ // 瑙f瀽杩斿洖鐨凧SON鏁版嵁 WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result); + + Console.WriteLine($"{JsonConvert.SerializeObject(content)}鍛煎彨鎴愬姛"); + // 妫�鏌ヨ繑鍥炵姸鎬侊紝濡傛灉澶辫触鍒欒繑鍥� if (!content.Status) return; @@ -796,6 +806,7 @@ #endregion 璋冪敤WMS鑾峰彇鍑哄簱浠诲姟 + // 鍒涘缓骞跺彂閫佷换鍔� CreateAndSendTask(taskDTO); } -- Gitblit v1.9.3