From 96adc295cb04fd135d63d3a907f2732274f90965 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 21 四月 2026 01:11:21 +0800
Subject: [PATCH] feat: 添加MES异步上传辅助服务并重构相关代码
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
index e8a07d7..15c9114 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
@@ -3,6 +3,7 @@
using Quartz;
using SqlSugar;
using System;
+using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
@@ -19,14 +20,14 @@
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 +45,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,8 +55,8 @@
/// <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();
--
Gitblit v1.9.3