hutongqing
2025-01-09 e2f151957b38d3c02c26be4343b6916d65e800b7
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_MenuRepository.cs
@@ -47,22 +47,26 @@
        public List<MenuDTO> GetAllMenuPDA()
        {
            List<Sys_Menu> menus = base.QueryData(x => (x.Enable == 1 || x.Enable == 2) && x.MenuType == 1).OrderByDescending(a => a.OrderNo).ThenByDescending(q => q.ParentId).ToList();
            List<MenuDTO> _menus = _mapper.Map<List<MenuDTO>>(menus);
            _menus.ForEach(x =>
            //List<Sys_Menu> menus = base.QueryData(x => (x.Enable == 1 || x.Enable == 2) && x.MenuType == App.User.MenuType).OrderByDescending(a => a.OrderNo).ThenByDescending(q => q.ParentId).ToList();
            //List<MenuDTO> _menus = _mapper.Map<List<MenuDTO>>(menus);
            //_menus.ForEach(x =>
            //{
            //    if (!string.IsNullOrEmpty(x.Auth) && x.Auth.Length > 10)
            //    {
            //        try
            //        {
            //            x.Actions = x.Auth.DeserializeObject<List<ActionDTO>>();
            //        }
            //        catch { }
            //    }
            //    x.Actions ??= new List<ActionDTO>();
            //});
            if (App.User.IsRoleIdSuperAdmin(App.User.RoleId))
            {
                if (!string.IsNullOrEmpty(x.Auth) && x.Auth.Length > 10)
                {
                    try
                    {
                        x.Actions = x.Auth.DeserializeObject<List<ActionDTO>>();
                    }
                    catch { }
                }
                x.Actions ??= new List<ActionDTO>();
            });
            string test = _menus.Serialize();
            return _menus;
                return GetAllMenu();
            }
            List<int> menuIds = GetPermissions(App.User.RoleId).Select(x => x.MenuId).ToList();
            return GetAllMenu().Where(x => menuIds.Contains(x.MenuId)).ToList();
        }
        public object GetSuperAdminMenu()