From e8042fe43a178ca26fe4fe4f8cf5dedbfc9910fd Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期四, 03 七月 2025 10:50:24 +0800 Subject: [PATCH] 更新任务查询逻辑以包含条形码在CommonConveyorLineJob.cs和 CommonConveyorLine_GWJob.cs文件中,修改了多个任务查询方法,现支持使用任务号、子设备代码和条形码进行查询。这一改动旨在提高任务查询的准确性。同时,移除了不再需要的注释代码行。 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 10 ++++++---- 1 files changed, 6 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 a671e3d..611f3dd 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,6 @@ _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, command.Barcode); if (task != null) { @@ -429,7 +428,6 @@ _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, command.Barcode); if (task != null && task.TaskState != (int)TaskInStatusEnum.Line_InFinish) { @@ -461,6 +459,12 @@ else { WebResponseContent content = _taskService.UpdateTaskStatusToNext(task); + WriteInfo(conveyorLine.DeviceName, content.ToJsonString()); + if (!content.Status) + { + ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍏ュ簱瀹屾垚,浠诲姟鎵ц澶辫触{JsonConvert.SerializeObject(content)}"); + return; + } conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, "1000", childDeviceCode); @@ -562,7 +566,6 @@ WriteInfo(conveyorLine.DeviceName, log); // 鏌ヨ姝e湪鎵ц鐨勮緭閫佺嚎浠诲姟锛屾牴鎹换鍔″彿鍜屽瓙璁惧浠g爜鑾峰彇浠诲姟淇℃伅 - //Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode); // 濡傛灉浠诲姟瀛樺湪 @@ -623,7 +626,6 @@ WriteInfo(conveyorLine.DeviceName, logs); // 鏌ヨ姝e湪鎵ц鐨勮緭閫佺嚎浠诲姟 - //var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode, command.Barcode); // 濡傛灉浠诲姟瀛樺湪 -- Gitblit v1.9.3