From b7f53ba61fbc1844d7b92ff852762b140d46ab54 Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期一, 23 六月 2025 19:58:16 +0800
Subject: [PATCH] 最新

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_DictionaryRepository.cs |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_DictionaryRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_DictionaryRepository.cs"
index f90799d..970ffbc 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_DictionaryRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_DictionaryRepository.cs"
@@ -23,22 +23,22 @@
         /// <param name="dicNos"></param>
         /// <param name="executeSql">鏄惁鎵ц鑷畾涔塻ql</param>
         /// <returns></returns>
-        public IEnumerable<Sys_Dictionary> GetDictionaries(IEnumerable<string> dicNos, bool executeSql = true)
+        public IEnumerable<Sys_Dictionary> GetDictionaries(IEnumerable<string> dicNos, bool executeSql = false)
         {
-            List<Sys_Dictionary> Dictionaries = GetAllDictionary();
+            List<Sys_Dictionary> Dictionaries = GetAllDictionary(dicNos);
 
-            foreach (var item in Dictionaries.Where(x => dicNos.Contains(x.DicNo)))
-            {
-                if (executeSql)
-                {
-                    //  2020.05.01澧炲姞鏍规嵁鐢ㄦ埛淇℃伅鍔犺浇瀛楀吀鏁版嵁婧恠ql
-                    string sql = item.DBSql;
-                    if (!string.IsNullOrEmpty(sql))
-                    {
-                        item.DicList = Query(sql);
-                    }
-                }
-            }
+            //foreach (var item in Dictionaries.Where(x => dicNos.Contains(x.DicNo)))
+            //{
+            //    if (executeSql)
+            //    {
+            //        //  2020.05.01澧炲姞鏍规嵁鐢ㄦ埛淇℃伅鍔犺浇瀛楀吀鏁版嵁婧恠ql
+            //        string sql = item.DBSql;
+            //        if (!string.IsNullOrEmpty(sql))
+            //        {
+            //            item.DicList = Query(sql);
+            //        }
+            //    }
+            //}
 
             return Dictionaries;
         }
@@ -59,10 +59,10 @@
             }
         }
 
-        private List<Sys_Dictionary> GetAllDictionary()
+        private List<Sys_Dictionary> GetAllDictionary(IEnumerable<string> dicNos)
         {
             //base.QueryData().ToList();
-            List<Sys_Dictionary> _dictionaries = Db.Queryable<Sys_Dictionary>().Includes(x => x.DicList).Where(x => x.Enable == 1).ToList();
+            List<Sys_Dictionary> _dictionaries = Db.Queryable<Sys_Dictionary>().Includes(x => x.DicList).Where(x => x.Enable == 1 && dicNos.Contains(x.DicNo)).ToList();
             return _dictionaries;
         }
     }

--
Gitblit v1.9.3