From 1e4b358de58e36bfbf692ab2538ff9e7d60fd025 Mon Sep 17 00:00:00 2001
From: ningshuxia <ningshuxia0927@outlook.com>
Date: 星期五, 24 二月 2023 14:11:17 +0800
Subject: [PATCH] 曲线筛查

---
 DAL/Local/IStation.DAL.LocalFile.Logic/logic_tree/LogicTree.cs |  123 +++++++++++++++++++++++++---------------
 1 files changed, 76 insertions(+), 47 deletions(-)

diff --git a/DAL/Local/IStation.DAL.LocalFile.Logic/logic_tree/LogicTree.cs b/DAL/Local/IStation.DAL.LocalFile.Logic/logic_tree/LogicTree.cs
index cc562e5..88cc052 100644
--- a/DAL/Local/IStation.DAL.LocalFile.Logic/logic_tree/LogicTree.cs
+++ b/DAL/Local/IStation.DAL.LocalFile.Logic/logic_tree/LogicTree.cs
@@ -16,7 +16,7 @@
         #region Path
 
         /// <summary>
-        /// 鑾峰彇鏂囦欢璺緞
+        /// 鏌ヨ鏂囦欢璺緞
         /// </summary> 
         private string GetFolderPath(long projectId)
         {
@@ -25,47 +25,47 @@
 
         #endregion
 
-        #region Query
+        #region Get
 
         /// <summary>
         /// 鏌ヨ鍏ㄩ儴
         /// </summary> 
-        public List<Entity.LogicTree> QueryAll(long projectId)
+        public List<Entity.LogicTree> GetAll(long projectId)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
             var path = GetFolderPath(projectId);
-            var all = FileIdHelper<Entity.LogicTree>.QueryAll(path);
-            var entitys = all?.OrderBy(x => x.SortCode).ToList();
-            return entitys;
+            var all = FileIdHelper<Entity.LogicTree>.GetAll(path);
+            var entities = all?.OrderBy(x => x.SortCode).ToList();
+            return entities;
         }
 
         /// <summary>
-        /// 鏍规嵁Id鏌ヨ
+        /// 鏍规嵁 Id鏌ヨ
         /// </summary> 
-        public Entity.LogicTree QueryById(long projectId, long id)
+        public Entity.LogicTree GetById(long projectId, long Id)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
-            if (id < 0)
+            if (Id < 0)
                 return default;
-            var all = QueryAll(projectId);
-            var entitys = all?.ToList();
-            return entitys?.Find(t => t.Id == id);
+            var all = GetAll(projectId);
+            var entities = all?.ToList();
+            return entities?.Find(t => t.Id == Id);
         }
 
         /// <summary>
-        /// 閫氳繃Id闆嗗悎鏌ヨ
+        /// 鏍规嵁 Id闆嗗悎鏌ヨ
         /// </summary> 
-        public List<Entity.LogicTree> QueryByIds(long projectId, IEnumerable<long> ids)
+        public List<Entity.LogicTree> GetByIds(long projectId, IEnumerable<long> Ids)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
-            if (ids == null || ids.Count() < 1)
+            if (Ids == null || Ids.Count() < 1)
                 return default;
-            var all = QueryAll(projectId);
-            var entitys = all?.Where(x => ids.Contains(x.Id)).ToList();
-            return entitys;
+            var all = GetAll(projectId);
+            var entities = all?.Where(x => Ids.Contains(x.Id)).ToList();
+            return entities;
         }
 
         #endregion
@@ -77,7 +77,7 @@
         /// </summary>
         public long Insert(long projectId, Entity.LogicTree rhs)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
             if (rhs == null)
                 return default;
@@ -90,7 +90,7 @@
         /// </summary>
         public bool Inserts(long projectId, IEnumerable<Entity.LogicTree> list)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
             if (list == null || list.Count() < 1)
                 return default;
@@ -103,27 +103,27 @@
         /// </summary>
         public Entity.LogicTree InsertR(long projectId, Entity.LogicTree rhs)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
             if (rhs == null)
                 return default;
             var path = GetFolderPath(projectId);
-            var entity = FileIdHelper<Entity.LogicTree>.InsertR(path, rhs);
-            return entity;
+            var entities = FileIdHelper<Entity.LogicTree>.InsertR(path, rhs);
+            return entities;
         }
 
         /// <summary>
         /// 鎵归噺鎻掑叆骞惰繑鍥�
         /// </summary>
-        public List<Entity.LogicTree> InsertRs(long projectId, IEnumerable<Entity.LogicTree> list)
+        public List<long> InsertsR(long projectId, IEnumerable<Entity.LogicTree> list)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
             if (list == null || list.Count() < 1)
                 return default;
             var path = GetFolderPath(projectId);
-            var entitys = FileIdHelper<Entity.LogicTree>.InsertRs(path, list);
-            return entitys;
+            var entities = FileIdHelper<Entity.LogicTree>.InsertRs(path, list);
+            return entities?.Select(x => x.Id).ToList();
         }
 
         #endregion
@@ -135,7 +135,7 @@
         /// </summary>
         public bool Update(long projectId, Entity.LogicTree rhs)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
             if (rhs == null)
                 return default;
@@ -148,7 +148,7 @@
         /// </summary>
         public bool Updates(long projectId, IEnumerable<Entity.LogicTree> list)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
             if (list == null || list.Count() < 1)
                 return default;
@@ -161,30 +161,30 @@
         #region Delete
 
         /// <summary>
-        /// 鏍规嵁Id鍒犻櫎
+        /// 鏍规嵁 Id鍒犻櫎
         /// </summary>
-        public bool DeleteById(long projectId, long id)
+        public bool DeleteById(long projectId, long Id)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
-            if (id < 0)
+            if (Id < 0)
                 return default;
             var path = GetFolderPath(projectId);
-            var bol = FileIdHelper<Entity.LogicTree>.DeleteById(path, id);
+            var bol = FileIdHelper<Entity.LogicTree>.DeleteById(path, Id);
             return bol;
         }
 
         /// <summary>
-        /// 鏍规嵁Id闆嗗悎鍒犻櫎
+        /// 鏍规嵁 Id闆嗗悎鍒犻櫎
         /// </summary>
-        public bool DeleteByIds(long projectId, IEnumerable<long> ids)
+        public bool DeleteByIds(long projectId, IEnumerable<long> Ids)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
-            if (ids == null || ids.Count() < 1)
+            if (Ids == null || Ids.Count() < 1)
                 return default;
             var path = GetFolderPath(projectId);
-            var bol = FileIdHelper<Entity.LogicTree>.DeleteByIds(path, ids);
+            var bol = FileIdHelper<Entity.LogicTree>.DeleteByIds(path, Ids);
             return bol;
         }
 
@@ -193,7 +193,7 @@
         /// </summary>
         public bool Delete(long projectId, Entity.LogicTree rhs)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
             if (rhs == null)
                 return default;
@@ -207,13 +207,13 @@
         /// </summary> 
         public bool Deletes(long projectId, IEnumerable<Entity.LogicTree> list)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
             if (list == null || list.Count() < 1)
                 return default;
             var path = GetFolderPath(projectId);
-            var ids = list.Select(x => x.Id).ToList();
-            var bol = FileIdHelper<Entity.LogicTree>.DeleteByIds(path, ids);
+            var Ids = list.Select(x => x.Id).ToList();
+            var bol = FileIdHelper<Entity.LogicTree>.DeleteByIds(path, Ids);
             return bol;
         }
 
@@ -222,7 +222,7 @@
         /// </summary>
         public bool DeleteAll(long projectId)
         {
-            if (projectId < 0)
+            if (projectId < 1)
                 return default;
             var path = GetFolderPath(projectId);
             var bol = FileIdHelper<Entity.LogicTree>.DeleteAll(path);
@@ -231,6 +231,35 @@
 
         #endregion
 
+        #region Cover 
+
+        /// <summary>
+        /// 鎵归噺瑕嗙洊
+        /// </summary>
+        public bool Covers(long projectId, IEnumerable<Entity.LogicTree> list)
+        {
+            if (projectId < 1)
+                return default;
+            if (list == null || list.Count() < 1)
+                return default;
+            var path = GetFolderPath(projectId);
+            return FileIdHelper<Entity.LogicTree>.Covers(path, list);
+        }
+
+        /// <summary>
+        /// 鎵归噺瑕嗙洊骞惰繑鍥�
+        /// </summary> 
+        public List<Entity.LogicTree> CoversR(long projectId, IEnumerable<Entity.LogicTree> list)
+        {
+            if (projectId < 1)
+                return default;
+            if (list == null || list.Count() < 1)
+                return default;
+            var path = GetFolderPath(projectId);
+            return FileIdHelper<Entity.LogicTree>.CoversR(path, list);
+        }
+
+        #endregion
     }
 
 }
\ No newline at end of file

--
Gitblit v1.9.3