From 5e851678cc02257bbbd179446de36082430ca5bc Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 13 四月 2026 15:12:04 +0800
Subject: [PATCH] feat(MES): 添加Mes_Log扩展逻辑

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
index c016c47..e9c6ad5 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
@@ -14,6 +14,7 @@
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_QuartzJob;
 using WIDESEAWCS_QuartzJob.Service;
+using ManualInboundTaskHandler = WIDESEAWCS_Tasks.ConveyorLineNewJob.ManualInbound.ManualInboundTaskHandler;
 
 namespace WIDESEAWCS_Tasks
 {
@@ -166,6 +167,7 @@
                                 continue;
                             }
 
+                            #region 妫�娴嬫槸鍚﹂渶瑕佺┖鎵樼洏
 
                             // ========== 妫�鏌ョ壒瀹氫綅缃槸鍚︽湁鎵樼洏 ==========
                             // 浠庨厤缃腑璇诲彇闇�瑕佹鏌ユ墭鐩樼殑浣嶇疆鍒楄〃
@@ -205,6 +207,8 @@
                                 }
                             }
 
+                            #endregion
+
                             // ========== 妫�鏌� PLC_STB 鏍囧織 ==========
                             // 鍙湁褰� PLC_STB 涓� 1 鏃舵墠澶勭悊浠诲姟
                             if (command.PLC_STB != 1)
@@ -212,6 +216,22 @@
                                 // 濡傛灉 WCS_ACK 涓� 1锛屽厛娓呴櫎锛堣〃绀哄鐞嗚繃涓婁竴娆¤姹傦級
                                 if (command.WCS_ACK == 1)
                                     conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)0, childDeviceCode);
+
+                                // 澶勭悊鎵嬪姩鍏ュ簱浠诲姟锛堣捣鐐逛负绾夸綋鐐逛綅鐨勪换鍔★級
+                                try
+                                {
+                                    var task = _taskService.QueryManualInboundTask(childDeviceCode);
+                                    if (task != null)
+                                    {
+                                        var handler = new ManualInboundTaskHandler(_taskService);
+                                        handler.WriteTaskToPlc(conveyorLine, childDeviceCode, task);
+                                    }
+                                }
+                                catch (Exception ex)
+                                {
+                                    _logger.LogError(ex, "澶勭悊鎵嬪姩鍏ュ簱浠诲姟寮傚父");
+                                    QuartzLogger.Error($"澶勭悊鎵嬪姩鍏ュ簱浠诲姟寮傚父: {ex.Message}", "CommonConveyorLineNewJob", ex);
+                                }
                                 continue;
                             }
 

--
Gitblit v1.9.3