From 627371d0ffdf50239313f2c86d022a0c5c69550d Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 21 四月 2026 19:43:46 +0800
Subject: [PATCH] refactor(logging): 重构日志记录模块,统一使用Serilog和QuartzLogHelper
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs | 35 ++++++++++-------------------------
1 files changed, 10 insertions(+), 25 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
index e8a07d7..dbf23e7 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
@@ -1,32 +1,17 @@
-锘縰sing Newtonsoft.Json;
-using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
-using Quartz;
-using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using WIDESEAWCS_Communicator;
-using WIDESEAWCS_Core.Enums;
-using WIDESEAWCS_Core.Helper;
-using WIDESEAWCS_QuartzJob.DeviceBase;
-using WIDESEAWCS_QuartzJob.DeviceEnum;
+锘縰sing SqlSugar;
+using System.Collections.Concurrent;
namespace WIDESEAWCS_QuartzJob
{
/// <summary>
- /// 闈欐�佸彉鑴稿瓨鍌ㄥ尯锛屽彲浣跨敤闈欐�佸彉閲忥紝涔熷彲娉ㄥ叆浣跨敤
+ /// 闈欐�佸彉閲忓瓨鍌ㄥ尯锛屽彲浣跨敤闈欐�佸彉閲忥紝涔熷彲娉ㄥ叆浣跨敤
/// </summary>
public class Storage
{
/// <summary>
- /// 宸茶繛鎺ヨ澶囧璞¢泦鍚�
+ /// 宸茶繛鎺ヨ澶囧璞¢泦鍚堬紙绾跨▼瀹夊叏锛�
/// </summary>
- public static List<IDevice> Devices = new List<IDevice>();
+ public static ConcurrentBag<IDevice> Devices = new ConcurrentBag<IDevice>();
/// <summary>
/// 璁惧瀵硅薄
@@ -44,8 +29,8 @@
/// <summary>
/// 鑾峰彇璁惧
/// </summary>
- /// <param name="deviceCode"></param>
- /// <returns></returns>
+ /// <param name="deviceCode">璁惧缂栫爜</param>
+ /// <returns>璁惧瀹炰緥锛屾湭鎵惧埌杩斿洖 null</returns>
public IDevice? GetDevice(string deviceCode)
{
return Pro_Devices.FirstOrDefault(x => x.DeviceCode == deviceCode);
@@ -54,11 +39,11 @@
/// <summary>
/// 鑾峰彇璁惧
/// </summary>
- /// <param name="deviceCodes"></param>
- /// <returns></returns>
+ /// <param name="deviceCodes">璁惧缂栫爜鍒楄〃</param>
+ /// <returns>鍖归厤鐨勮澶囧垪琛�</returns>
public List<IDevice> GetDevices(List<string> deviceCodes)
{
return Pro_Devices.Where(x => deviceCodes.Contains(x.DeviceCode)).ToList();
}
}
-}
+}
\ No newline at end of file
--
Gitblit v1.9.3