From 554694000f4d7ffc231a23e7ff429595c254ceaa Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期三, 07 八月 2024 17:41:14 +0800 Subject: [PATCH] 辅助功能添加 --- IStation.Service/07-global/GlobalHelper.cs | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/IStation.Service/07-global/01-helper/GlobalHelper.cs b/IStation.Service/07-global/GlobalHelper.cs similarity index 97% rename from IStation.Service/07-global/01-helper/GlobalHelper.cs rename to IStation.Service/07-global/GlobalHelper.cs index c8ac408..5906e38 100644 --- a/IStation.Service/07-global/01-helper/GlobalHelper.cs +++ b/IStation.Service/07-global/GlobalHelper.cs @@ -56,6 +56,44 @@ return true; } + /// <summary> + /// 鏄惁鏄�1杈撴按 + /// </summary> + /// <param name="flags"></param> + /// <returns></returns> + public static bool IsStation1(IEnumerable<int> flags) + { + if (flags == null || !flags.Any()) + { + return false; + } + var flag = flags.FirstOrDefault(); + if (!Station1FlagList.Contains(flag)) + { + return false; + } + return true; + } + + /// <summary> + /// 鏄惁鏄�2杈撴按 + /// </summary> + /// <param name="flags"></param> + /// <returns></returns> + public static bool IsStation2(IEnumerable<int> flags) + { + if (flags==null|| !flags.Any()) + { + return false; + } + var flag = flags.FirstOrDefault(); + if (!Station2FlagList.Contains(flag)) + { + return false; + } + return true; + } + #endregion #region 浼楁瘏Scada瀵规帴鏍囩 -- Gitblit v1.9.3