From 97eb1b2a4f11ce60fda7a47ac1edfa588faf22eb Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 28 8月 2024 14:28:41 +0800
Subject: [PATCH] //单独处理 质量数据的状态

---
 DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/LogTextHelper.cs |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/LogTextHelper.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/LogTextHelper.cs
index 3db6aee..8023044 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/LogTextHelper.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/LogTextHelper.cs
@@ -13,6 +13,7 @@
         /// </summary>
         public static void BatchDeleteLog()
         {
+
             List<string> deleteFolder = new System.Collections.Generic.List<string>();
             string folderPath = @"d:\\Log";
             FolderHelper.ListDirectory(folderPath, 0, ref deleteFolder);
@@ -24,6 +25,21 @@
         }
 
         /// <summary>
+        /// 鎵规鍒犻櫎鏃ュ織鏂囦欢
+        /// </summary>
+        public static void BatchDeleteLog(string folderPath, int days)
+        {
+
+            List<string> deleteFolder = new System.Collections.Generic.List<string>();
+            FolderHelper.ListDirectory(folderPath, 0, ref deleteFolder);
+
+            foreach (var item in deleteFolder)
+            {
+                FileHelper.DeleteOldFiles(item, days);//鍒犻櫎涓�涓湀鐨勬暟鎹�
+            }
+        }
+
+        /// <summary>
         /// 寰�鏃ュ織閲岃拷鍔犲唴瀹�
         /// </summary>
         /// <param name="folder">鏃ュ織鐩綍</param>

--
Gitblit v1.9.3