From c5c3e4e538a11f2a6391e6b2613375b1f92eb20a Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 15 四月 2026 14:39:18 +0800
Subject: [PATCH] feat: 添加Quartz日志助手类并重构任务服务日志记录
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineTaskFilter.cs | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineTaskFilter.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineTaskFilter.cs
index 429b7a9..1d3b938 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineTaskFilter.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineTaskFilter.cs
@@ -56,8 +56,7 @@
public Dt_Task? QueryPendingTask(string deviceCode, string childDeviceCode)
{
var task = _taskService.QueryConveyorLineTask(deviceCode, childDeviceCode);
- _logger.LogDebug("QueryPendingTask锛氳澶� {DeviceCode}锛屽瓙璁惧 {ChildDeviceCode}锛屾煡璇㈢粨鏋�: {TaskNum}", deviceCode, childDeviceCode, task?.TaskNum);
- QuartzLogger.Debug($"QueryPendingTask锛氳澶� {deviceCode}锛屽瓙璁惧 {childDeviceCode}锛屾煡璇㈢粨鏋�: {task?.TaskNum}", deviceCode);
+ QuartzLogHelper.LogDebug(_logger, "QueryPendingTask锛氳澶� {DeviceCode}锛屽瓙璁惧 {ChildDeviceCode}锛屾煡璇㈢粨鏋�: {TaskNum}", $"QueryPendingTask锛氳澶� {deviceCode}锛屽瓙璁惧 {childDeviceCode}锛屾煡璇㈢粨鏋�: {task?.TaskNum}", deviceCode, deviceCode, childDeviceCode, task?.TaskNum);
return task;
}
@@ -74,8 +73,7 @@
public Dt_Task? QueryExecutingTask(int taskNo, string childDeviceCode)
{
var task = _taskService.QueryExecutingConveyorLineTask(taskNo, childDeviceCode);
- _logger.LogDebug("QueryExecutingTask锛氫换鍔″彿 {TaskNo}锛屽瓙璁惧 {ChildDeviceCode}锛屾煡璇㈢粨鏋�: {Found}", taskNo, childDeviceCode, task != null);
- QuartzLogger.Debug($"QueryExecutingTask锛氫换鍔″彿 {taskNo}锛屽瓙璁惧 {childDeviceCode}锛屾煡璇㈢粨鏋�: {(task != null)}", childDeviceCode);
+ QuartzLogHelper.LogDebug(_logger, "QueryExecutingTask锛氫换鍔″彿 {TaskNo}锛屽瓙璁惧 {ChildDeviceCode}锛屾煡璇㈢粨鏋�: {Found}", $"QueryExecutingTask锛氫换鍔″彿 {taskNo}锛屽瓙璁惧 {childDeviceCode}锛屾煡璇㈢粨鏋�: {(task != null)}", childDeviceCode, taskNo, childDeviceCode, task != null);
return task;
}
@@ -91,8 +89,7 @@
/// <returns>璇锋眰鏄惁鎴愬姛</returns>
public bool RequestWmsTask(string barcode, string childDeviceCode)
{
- _logger.LogInformation("RequestWmsTask锛氬悜WMS璇锋眰浠诲姟锛屾潯鐮�: {Barcode}锛屽瓙璁惧: {ChildDeviceCode}", barcode, childDeviceCode);
- QuartzLogger.Info($"鍚慦MS璇锋眰浠诲姟锛屾潯鐮�: {barcode}", childDeviceCode);
+ QuartzLogHelper.LogInfo(_logger, "RequestWmsTask锛氬悜WMS璇锋眰浠诲姟锛屾潯鐮�: {Barcode}锛屽瓙璁惧: {ChildDeviceCode}", $"鍚慦MS璇锋眰浠诲姟锛屾潯鐮�: {barcode}", childDeviceCode, barcode, childDeviceCode);
var result = _taskService.RequestWMSTask(barcode, childDeviceCode);
return result.Status;
}
--
Gitblit v1.9.3