dengjunjie
2025-02-17 2bdad959bc30a7c24bf08ca81fb52fff63e79f52
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemRepository/Sys_DictionaryRepository.cs
@@ -49,30 +49,6 @@
            }
            return DictionaryDTO;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="dicNos"></param>
        /// <param name="executeSql">鏄惁鎵ц鑷畾涔塻ql</param>
        /// <returns></returns>
        //public IEnumerable<Sys_Dictionary> GetDictionaries(IEnumerable<string> dicNos, List<RoleNodes> roleNodes, bool executeSql = true)
        //{
        //    List<Sys_Dictionary> Dictionaries = GetAllDictionary();
        //    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(GetCustomDBSql(item.DicNo, sql, roleNodes), item.DicNo);
        //            }
        //        }
        //    }
        //    return Dictionaries;
        //}
        List<SourceKeyVaule> QueryRole(string sql)
        {
            try
@@ -150,12 +126,11 @@
                       ParentId = 0,//灏嗚嚜宸辩殑瑙掕壊浣滀负root鑺傜偣
                       RoleName = s.RoleName
                   }).ToList();
            //int currnetRoleId = UserContext.Current.RoleId;
            List<int> roleIds = RoleNodes.Select(x => x.Id).ToList();
            List<int> roleIds = roleNodes.Select(x => x.Id).ToList();
            //roleIds.Add(App.User.RoleId);
            return originalSql = $@"SELECT Role_Id as 'key',Role_Id AS id,ParentId AS parentId,RoleName as 'value' FROM Sys_Role
                      WHERE Enable=1  and Role_Id in ({string.Join(',', roleIds)})";
            return originalSql = $@"SELECT RoleId as 'key',RoleId AS id,ParentId AS parentId,RoleName as 'value' FROM Sys_Role
                      WHERE Enable=1  and RoleId in ({string.Join(',', roleIds)})";
        }
        private List<Sys_Dictionary> GetAllDictionary()