From 7278264f027d62664a0209699d0f66a22fd06a8e Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 13 四月 2026 10:24:04 +0800
Subject: [PATCH] feat: 更新依赖版本并优化MES接口调用
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
index 5985236..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,13 +207,31 @@
}
}
+ #endregion
+
// ========== 妫�鏌� PLC_STB 鏍囧織 ==========
// 鍙湁褰� PLC_STB 涓� 1 鏃舵墠澶勭悊浠诲姟
if (command.PLC_STB != 1)
{
// 濡傛灉 WCS_ACK 涓� 1锛屽厛娓呴櫎锛堣〃绀哄鐞嗚繃涓婁竴娆¤姹傦級
if (command.WCS_ACK == 1)
- conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 0, childDeviceCode);
+ 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