Пример #1
0
        public List <ModuleInfo> GetTaskConfigInfoByUser(string userSysID, string configFilePath)
        {
            var modules = GetTaskFromConfigInfo(configFilePath);


            /// <param name="PermissionValue">权限值:0:新建;1:修改; 2:删除;3:查看;4:公文发布;5:新闻发布;6:转发 </param>
            SysEntityMenuBLL pmbll = new SysEntityMenuBLL();

            var menuList = pmbll.GetSysLeftMenuFilterPermissionToNewFrameAndPermision(userSysID, "0");

            List <string> codes = new List <string>();

            //获取所有的menuCode
            foreach (var item in menuList)
            {
                if (!string.IsNullOrEmpty(item.MENUCODE))
                {
                    codes.Add(item.MENUCODE);

                    if (!codes.Contains(item.SYSTEMTYPE))
                    {
                        codes.Add(item.SYSTEMTYPE);
                    }
                }
            }

            var userMOdules = from item in modules
                              where codes.Contains(item.ModuleCode)
                              select item;

            //根据用户过滤
            //获取用户有权限的模块。

            return(userMOdules.ToList());
        }
Пример #2
0
        /// <summary>
        /// 根据权限ID获取权限定义
        /// </summary>
        /// <param name="ID">权限ID</param>
        /// <returns>权限定义列表</returns>
        public T_SYS_PERMISSION GetSysPermissionByID(string ID)
        {
            try
            {
                SysEntityMenuBLL menuBll = new SysEntityMenuBLL();
                var ent1 = from ent in dal.GetObjects()
                           where ent.PERMISSIONID == ID
                           select ent;
                if (ent1.Count() > 0)
                {
                    if (!string.IsNullOrEmpty(ent1.FirstOrDefault().PERMISSIONCODE)) //不是公共权限
                    {
                        var ents = from ent in dal.GetObjects().Include("T_SYS_ENTITYMENU")
                                   where ent.PERMISSIONID == ID
                                   select ent;
                        //ents.ToList();

                        //var ents = from ent in dal.GetObjects().Include("T_SYS_ENTITYMENU")
                        //           join e in menuBll.GetTable() on ent.T_SYS_ENTITYMENU.ENTITYMENUID equals e.ENTITYMENUID
                        //           where ent.PERMISSIONID == ID
                        //           select ent;
                        return(ents.Count() > 0 ? ents.FirstOrDefault() : null);
                    }
                }
                return(ent1.Count() > 0 ? ent1.FirstOrDefault() : null);
            }
            catch (Exception ex)
            {
                Tracer.Debug("权限SysPermissionBLL-GetSysPermissionByID" + System.DateTime.Now.ToString() + " " + ex.ToString());
                return(null);
            }
        }
Пример #3
0
 public List <V_UserMenuPermission> GetSysLeftMenuFilterPermissionToNewFrame(string userID)
 {
     using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
     {
         List <V_UserMenuPermission> menuList = bll.GetSysLeftMenuFilterPermissionToNewFrame(userID);
         return(menuList != null?menuList.ToList() : null);
     }
 }
Пример #4
0
        public List<T_SYS_ENTITYMENU> GetSysLeftMenuFilterPermission(string sysType, string userID, ref List<string> menuids)
        {

            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {
                IQueryable<T_SYS_ENTITYMENU> menuList = bll.GetSysLeftMenuFilterPermission(sysType, userID, ref menuids);

                return menuList.Count() > 0 ? menuList.ToList() : null;
            }

        }
Пример #5
0
 public List<T_SYS_ENTITYMENU> GetSysLeftMenu(string sysType, string userID)
 {
     List<T_SYS_ENTITYMENU> menuList;
     string keyString = "GetSysLeftMenu" + sysType + userID;
     //GetSysLeftMenuFilterPermissionToNewFrame(userID);
     if (WCFCache.Current[keyString] == null)
     {
         using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
         {
             menuList = bll.GetSysLeftMenu(sysType, userID).ToList();
             WCFCache.Current.Insert(keyString, menuList, DateTime.Now.AddMinutes(15));
         }
     }
     else
     {
         menuList = (List<T_SYS_ENTITYMENU>)WCFCache.Current[keyString];
     }
     return menuList.Count() > 0 ? menuList : null;
 }
Пример #6
0
        public T_SYS_ENTITYMENU GetSysMenuByEntityCode(string entityCode)
        {


            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {

                T_SYS_ENTITYMENU menu;
                string keyString = "GetSysMenuByEntityCode" + entityCode;
                if (WCFCache.Current[keyString] == null)
                {

                    menu = bll.GetSysMenuByEntityCode(entityCode);
                    WCFCache.Current.Insert(keyString, menu, DateTime.Now.AddMinutes(15));

                }
                else
                {
                    menu = (T_SYS_ENTITYMENU)WCFCache.Current[keyString];
                }

                return menu;
            }

        }
Пример #7
0
        public List<ModuleInfo> GetTaskConfigInfoByUser(string userSysID, string configFilePath)
        {
            var modules = GetTaskFromConfigInfo(configFilePath);


            /// <param name="PermissionValue">权限值:0:新建;1:修改; 2:删除;3:查看;4:公文发布;5:新闻发布;6:转发 </param>
            SysEntityMenuBLL pmbll = new SysEntityMenuBLL();

            var menuList = pmbll.GetSysLeftMenuFilterPermissionToNewFrameAndPermision(userSysID, "0");

            List<string> codes = new List<string>();
            //获取所有的menuCode
            foreach (var item in menuList)
            {
                if (!string.IsNullOrEmpty(item.MENUCODE))
                {
                    codes.Add(item.MENUCODE);

                    if (!codes.Contains(item.SYSTEMTYPE))
                        codes.Add(item.SYSTEMTYPE);

                }
            }

            var userMOdules = from item in modules
                              where codes.Contains(item.ModuleCode)
                              select item;

            //根据用户过滤
            //获取用户有权限的模块。

            return userMOdules.ToList();
        }
Пример #8
0
 public List<T_SYS_ENTITYMENU> GetEntityMenuByMenuIDs(string[] MenuIDs, string StrSysType)
 {
     using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
     {
         IQueryable<T_SYS_ENTITYMENU> Listmenus = bll.GetEntityMenuByMenuIDs(MenuIDs, StrSysType);
         return Listmenus != null ? Listmenus.ToList() : null;
     }
 }
Пример #9
0
        public void SysMenuUpdate(T_SYS_ENTITYMENU obj)
        {
            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {
                string keyString = "GetSysMenuByID" + obj.ENTITYMENUID;
                string keyStringLookUp = "GetSysMenuByTypeToLookUp" + obj.SYSTEMTYPE;

                if (WCFCache.Current[keyString] != null)
                {
                    WCFCache.Current[keyString] = null;
                }
                if (WCFCache.Current[keyStringLookUp] != null)
                {
                    WCFCache.Current[keyStringLookUp] = null;
                }
                                
                bll.SysMenuUpdate(obj);
            }
        }
Пример #10
0
        public string SysMenuAdd(T_SYS_ENTITYMENU obj)
        {
            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {
                if (obj != null)
                {
                    string keyString = "GetSysMenuByType" + obj.SYSTEMTYPE;
                    string keyStringLookUp = "GetSysMenuByTypeToLookUp" + obj.SYSTEMTYPE;

                    if (WCFCache.Current[keyString] != null)
                    {
                        WCFCache.Current[keyString] = null;
                    }
                    if (WCFCache.Current[keyStringLookUp] != null)
                    {
                        WCFCache.Current[keyStringLookUp] = null;
                    }
                }
                return bll.SysMenuAdd(obj);
            }
        }
Пример #11
0
        public T_SYS_ENTITYMENU GetSysMenuByID(string menuID)
        {
            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {

                #region 
                T_SYS_ENTITYMENU menu;
                string keyString = "GetSysMenuByID" + menuID;
                if (WCFCache.Current[keyString] == null)
                {

                    menu = bll.GetSysMenuByID(menuID);
                    WCFCache.Current.Insert(keyString, menu, DateTime.Now.AddMinutes(15));

                }
                else
                {
                    menu = (T_SYS_ENTITYMENU)WCFCache.Current[keyString];
                }
                return menu;
                #endregion
            }
        }
Пример #12
0
 public List<V_EntityMenu> GetEntityMenuByUser(string sysType, string userID, ref string Flag)
 {
     using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
     {
         List<V_EntityMenu> menuList = bll.GetEntityMenuByUser(sysType, userID, ref Flag);
         if (menuList == null) return null;
         return menuList.Count() > 0 ? menuList.ToList() : null;
     }
 }
Пример #13
0
        public List<V_UserMenuPermission> GetSysLeftMenuFilterPermissionToNewFrameAndPermission(string userID,string PermissionValue)
        {

            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {
                IQueryable<V_UserMenuPermission> menuList = bll.GetSysLeftMenuFilterPermissionToNewFrameAndPermision(userID, PermissionValue);

                return menuList != null ? menuList.ToList() : null;
            }

        }
Пример #14
0
        /// <summary>
        /// 根据用户系统ID获取用户所拥有的系统模块目录信息。
        /// </summary>
        /// <param name="userSysID">用户系统ID</param>
        /// <returns>生成后的模块集合</returns>
        public List <ModuleInfo> GetModuleCatalogByUser(string userSysID)
        {
            Tracer.Debug("GetModuleCatalogByUser Start,! userSysID:" + userSysID);
            DateTime dtstart = DateTime.Now;

            try
            {
                string         result   = string.Empty;
                SysUserRoleBLL RoleBll  = new SysUserRoleBLL();
                string         syscodes = RoleBll.GetSystemTypeByUserID(userSysID, ref result);
                string[]       codelist = syscodes.Split(',');

                List <ModuleInfo> moduleinfos = GetModulesBySystemCode(codelist);
                List <ModuleInfo> tempModules = new List <ModuleInfo>();

                SysEntityMenuBLL pmbll = new SysEntityMenuBLL();

                List <V_UserMenuPermission> pmList = pmbll.GetSysLeftMenuFilterPermissionToNewFrame(userSysID);
                var menuList = from ent in pmList
                               orderby ent.SYSTEMTYPE, ent.ORDERNUMBER
                select ent;



                foreach (var item in menuList)
                {
                    var childs = menuList.Where(mm => mm.EntityMenuFatherID == item.ENTITYMENUID);

                    if (item.ENTITYMENUID == "9b58888d-cf4e-40cf-bab6-de4ee00d0ceb")
                    {
                        Tracer.Debug("!已获取到(新)流程定义");
                    }
                    if (item.ENTITYMENUID == "709D9380-5405-4429-B047-20100401D255")
                    {
                        Tracer.Debug("!已获取到系统科目字典维护");
                    }
                    else
                    {
                        Tracer.Debug("已获取到菜单:" + item.MENUNAME);
                    }

                    ModuleInfo parentModule = moduleinfos.FirstOrDefault(e => (e.ModuleCode == item.SYSTEMTYPE));

                    ModuleInfo module = new ModuleInfo()
                    {
                        ModuleCode     = item.MENUCODE,
                        ModuleIcon     = item.MENUICONPATH,
                        ModuleName     = item.ENTITYMENUID,
                        ParentModuleID = item.EntityMenuFatherID,
                        ModuleID       = item.ENTITYMENUID,
                        SystemType     = item.SYSTEMTYPE,
                        ClientID       = item.CHILDSYSTEMNAME,
                        ModuleType     = item.URLADDRESS,
                        Description    = item.MENUNAME,
                        UseState       = "0"
                    };

                    if ((childs.Count() > 0))
                    {
                        module.ParentModuleID = item.SYSTEMTYPE;
                    }
                    //配置菜单的依赖系统关系
                    module.DependsOn = new System.Collections.ObjectModel.Collection <string>();
                    if (parentModule != null)
                    {
                        module.DependsOn.Add(parentModule.ModuleName);

                        if (item.CHILDSYSTEMNAME != null)
                        {
                            //SMT.FBAnalysis.UI
                            if (parentModule.ModuleName != item.CHILDSYSTEMNAME && parentModule.ModuleName != "SMT.SaaS.LM.UI")
                            {
                                module.DependsOn.Add(item.CHILDSYSTEMNAME);
                                //Debug.WriteLine(parentModule.ModuleName+" => "+item.CHILDSYSTEMNAME);
                            }
                        }
                    }

                    if (item.URLADDRESS != null)
                    {
                        if (item.URLADDRESS.IndexOf("[mvc]") >= 0)
                        {
                            module.ModuleType = item.URLADDRESS;   //增加平台兼容地址获取
                        }
                        else
                        {
                            RefreshModuleType(parentModule, module, item.CHILDSYSTEMNAME, item.URLADDRESS);
                        }
                    }

                    tempModules.Add(module);
                }

                moduleinfos.AddRange(tempModules);
                return(moduleinfos);
            }
            catch (Exception ex)
            {
                Tracer.Debug("Dal GetModuleCatalogByUser 异常:" + ex.ToString());
                //throw ex;
                return(new List <ModuleInfo>());
            }
            finally
            {
                TimeSpan ts = DateTime.Now.Subtract(dtstart);
                Tracer.Debug("GetModuleCatalogByUser completed !耗时:" + ts.TotalSeconds + "s userSysID:" + userSysID);
            }
        }
Пример #15
0
        public List<V_MenuSetRole> GetFBSysMenuByType(string systemType,string employeeid)
        {
            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {
                #region 
                List<V_MenuSetRole> menuList;
                string keyString = "";
                T_SYS_FBADMIN UserFb=null;
                if (!string.IsNullOrEmpty(employeeid))
                {
                    T_SYS_USER Userinfo = this.GetUserByEmployeeID(employeeid);
                    if (Userinfo != null)
                    {
                        UserFb = this.getFbAdmin(Userinfo.SYSUSERID);
                    }
                    if (UserFb == null)
                    {
                        keyString = "GetFBSysMenuByType" + systemType;
                    }
                    else
                    {
                        keyString = "GetFBSysMenuByType" + systemType + employeeid;
                    }
                }
                else
                {
                    keyString = "GetFBSysMenuByType" + systemType;
                }
                if (WCFCache.Current[keyString] == null)
                {
                    IQueryable<V_MenuSetRole> IQList = UserFb != null ? bll.GetSysMenuNameByTypeInfoNew(systemType) : bll.GetSysMenuNameByTypeInfoNewToFbAdmins(systemType);
                    menuList = IQList == null ? null : IQList.ToList();
                    WCFCache.Current.Insert(keyString, menuList, DateTime.Now.AddMinutes(15));

                }
                else
                {
                    menuList = (List<V_MenuSetRole>)WCFCache.Current[keyString];
                }
                #endregion
                return menuList.Count() > 0 ? menuList : null;
            }
        }
Пример #16
0
        public List<V_MenuSetRole> GetEDMSysMenuByType(string systemType)
        {

            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {
                List<V_MenuSetRole> menuList;
                string keyString = "GetEDMSysMenuByType" + systemType;
                if (WCFCache.Current[keyString] == null)
                {
                    IQueryable<V_MenuSetRole> IQList = bll.GetSysMenuNameByTypeInfoNew(systemType);
                    menuList = IQList == null ? null : IQList.ToList();
                    WCFCache.Current.Insert(keyString, menuList, DateTime.Now.AddMinutes(15));

                }
                else
                {
                    menuList = (List<V_MenuSetRole>)WCFCache.Current[keyString];
                }

                return menuList.Count() > 0 ? menuList : null;
            }

        }
Пример #17
0
 public List<V_EntityMenu> GetEntityMenuAll()
 {
     using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
     {
         List<V_EntityMenu> menuList = bll.GetEntityMenuAll();
         return menuList.Count() > 0 ? menuList.ToList() : null;
     }
 }
Пример #18
0
        public List<T_SYS_ENTITYMENU> GetSysMenuInfosListByParentID(string parentID)
        {
            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {
                #region 
                List<T_SYS_ENTITYMENU> menu;
                string keyString = "GetSysMenuInfosListByParentID" + parentID;
                if (WCFCache.Current[keyString] == null)
                {

                    menu = bll.GetSysMenuInfosByParentID(parentID);
                    WCFCache.Current.Insert(keyString, menu, DateTime.Now.AddMinutes(15));

                }
                else
                {
                    menu = (List<T_SYS_ENTITYMENU>)WCFCache.Current[keyString];
                }
                return menu;
                #endregion
            }
        }
Пример #19
0
 public List<T_SYS_ENTITYMENU> GetSysMenuByTypeToLookUp(string systemType, string parentID)
 {
     //SysEntityMenuBLL bll = new SysEntityMenuBLL();
     //IQueryable<T_SYS_ENTITYMENU> menuList = bll.GetSysMenuByType(systemType, parentID);
     #region 
     using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
     {
         List<T_SYS_ENTITYMENU> menuList;
         string keyString = "GetSysMenuByTypeToLookUp" + systemType + parentID;
         if (WCFCache.Current[keyString] == null)
         {
             IQueryable<T_SYS_ENTITYMENU> IQList = bll.GetSysMenuByTypeToLookUp(systemType, parentID);
             menuList = IQList == null ? null : IQList.ToList();
             WCFCache.Current.Insert(keyString, menuList, DateTime.Now.AddMinutes(15));
         }
         else
         {
             menuList = (List<T_SYS_ENTITYMENU>)WCFCache.Current[keyString];
         }
     #endregion
         return menuList != null ? menuList : null;
     }
 }
Пример #20
0
        public List<T_SYS_ENTITYMENU> GetSysMenuByTypeToLookUpForFbAdmin(string systemType, string parentID,string EmployeeID)
        {
            //SysEntityMenuBLL bll = new SysEntityMenuBLL();
            //IQueryable<T_SYS_ENTITYMENU> menuList = bll.GetSysMenuByType(systemType, parentID);
            #region 
            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {
                List<T_SYS_ENTITYMENU> menuList;
                T_SYS_USER Userinfo = this.GetUserByEmployeeID(EmployeeID);
                string keyString = "GetSysMenuByTypeToLookUp" + systemType + parentID + EmployeeID;
                if (Userinfo == null)
                {
                    return null;
                }

                T_SYS_FBADMIN UserFb = null;
                
                if (WCFCache.Current[keyString] == null)
                {
                    if (!string.IsNullOrEmpty(EmployeeID))
                    {
                        UserFb = this.getFbAdmin(Userinfo.SYSUSERID);
                    }
                    IQueryable<T_SYS_ENTITYMENU> IQList = UserFb == null ? bll.GetSysMenuByTypeToLookUpForNoFbAdmin(systemType, parentID) : bll.GetSysMenuByTypeToLookUp(systemType, parentID);
                    menuList = IQList == null ? null : IQList.ToList();
                    WCFCache.Current.Insert(keyString, menuList, DateTime.Now.AddMinutes(15));
                }
                else
                {
                    menuList = (List<T_SYS_ENTITYMENU>)WCFCache.Current[keyString];
                }
            #endregion
                return menuList != null ? menuList : null;
            }
        }
Пример #21
0
        public List<T_SYS_ENTITYMENU> GetCustomerPermissionMenus(string employeeid)
        {
            using (SysEntityMenuBLL MenurBll = new SysEntityMenuBLL())
            {
                IQueryable<T_SYS_ENTITYMENU> ents = MenurBll.GetCustomerPermissionMenus(employeeid);
                return ents == null ? null : ents.ToList();

            }
        }
Пример #22
0
 public string SysMenuDelete(string menuID)
 {
     using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
     {
         return bll.SysMenuDelete(menuID);
     }
 }
Пример #23
0
        public List<T_SYS_ENTITYMENU> GetSysMenuByTypePaging(int pageIndex, int pageSize, string sort, string filterString, object[] paras, ref int pageCount, LoginUserInfo loginUserInfo)
        {
            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {
                T_SYS_USER Userinfo = this.GetUserByEmployeeID(loginUserInfo.userID);
                T_SYS_FBADMIN UserFb = null;
                bool IsFbAdmin = false;//是否预算管理员
                if (Userinfo != null)
                {
                    UserFb = this.getFbAdmin(Userinfo.SYSUSERID);
                }
                if (UserFb != null)
                {
                    IsFbAdmin = true;
                }
                IQueryable<T_SYS_ENTITYMENU> menuList = bll.GetSysMenuByTypeWithPaging(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, loginUserInfo.userID, IsFbAdmin);

                return menuList !=null ? menuList.ToList() : null;
            }
        }
Пример #24
0
        public List<V_UserMenuPermission> GetSysLeftMenuFilterPermissionToNewFrame(string userID)
        {
            //using (SysUserBLL bll = new SysUserBLL())
            //{
            //    List<V_BllCommonUserPermission> plist;
            //    string menuCode = "T_HR_COMPANY";
            //    userID = "f89fb1ce-460f-4f53-8c45-04d8b5d45aca";
            //    string keyString = "BllCommonUserMenuPermsstring" + menuCode + userID;
            //    string Companykey = "BllOwnerCompanyIDs" + menuCode + userID;
            //    string Departmentkey = "BllOwnerDepartmentIDs" + menuCode + userID;
            //    string Positionkey = "BllOwnerPositionIDs" + menuCode + userID;
            //    string OwnerCompanyIDs = "";
            //    string OwnerDepartmentIDs = "";
            //    string OwnerPositionIDs = "";
            //    //if (WCFCache.Current[keyString] == null)
            //    //{

            //        IQueryable<V_BllCommonUserPermission> IQlist = bll.GetUserMenuPermsByUserPermisionBllCommon(menuCode, userID, ref OwnerCompanyIDs, ref OwnerDepartmentIDs, ref OwnerPositionIDs);
            //        //if(IQlist != null)
            //        plist = IQlist != null ? IQlist.ToList() : null;
            //        WCFCache.Current.Insert(keyString, plist, DateTime.Now.AddMinutes(1));
            //        WCFCache.Current.Insert(Companykey, OwnerCompanyIDs, DateTime.Now.AddMinutes(1));
            //        WCFCache.Current.Insert(Departmentkey, OwnerDepartmentIDs, DateTime.Now.AddMinutes(1));
            //        WCFCache.Current.Insert(Positionkey, OwnerPositionIDs, DateTime.Now.AddMinutes(1));


            //    //}
            //    //else
            //    //{
            //    //    plist = (List<V_BllCommonUserPermission>)WCFCache.Current[keyString];
            //    //    OwnerCompanyIDs = (string)WCFCache.Current[Companykey];
            //    //    OwnerDepartmentIDs = (string)WCFCache.Current[Departmentkey];
            //    //    OwnerPositionIDs = (string)WCFCache.Current[Positionkey];

            //    //}

            //    return null;
            //}

            using (SysEntityMenuBLL bll = new SysEntityMenuBLL())
            {
                Tracer.Debug("系统用户SysUserBLL-GetSysLeftMenuFilterPermissionToNewFrame");
                T_SYS_FBADMIN UserFb = null;

                T_SYS_USER Userinfo = this.GetUserByID(userID);
                if (Userinfo != null)
                {
                    UserFb = this.getFbAdmin(Userinfo.SYSUSERID);
                }

                IQueryable<V_UserMenuPermission> menuList = UserFb != null ? bll.GetSysLeftMenuFilterPermissionToNewFrame(userID, UserFb) : bll.GetSysLeftMenuFilterPermissionToNewFrameForNotFbAdmin(userID, UserFb);

                return menuList != null ? menuList.ToList() : null;
            }

        }
Пример #25
0
        /// <summary>
        /// 根据用户系统ID获取用户所拥有的系统模块目录信息。
        /// </summary>
        /// <param name="userSysID">用户系统ID</param>
        /// <returns>生成后的模块集合</returns>
        public List<ModuleInfo> GetModuleCatalogByUser(string userSysID)
        {
            Tracer.Debug("GetModuleCatalogByUser Start,! userSysID:" + userSysID);
            DateTime dtstart = DateTime.Now;
            try
            {
                string result = string.Empty;
                SysUserRoleBLL RoleBll = new SysUserRoleBLL();
                string syscodes = RoleBll.GetSystemTypeByUserID(userSysID, ref result);
                string[] codelist = syscodes.Split(',');

                List<ModuleInfo> moduleinfos = GetModulesBySystemCode(codelist);
                List<ModuleInfo> tempModules = new List<ModuleInfo>();

                SysEntityMenuBLL pmbll = new SysEntityMenuBLL();

                List<V_UserMenuPermission> pmList = pmbll.GetSysLeftMenuFilterPermissionToNewFrame(userSysID);
                var menuList = from ent in pmList
                               orderby ent.SYSTEMTYPE, ent.ORDERNUMBER
                               select ent;



                foreach (var item in menuList)
                {
                    var childs = menuList.Where(mm => mm.EntityMenuFatherID == item.ENTITYMENUID);

                    if (item.ENTITYMENUID == "9b58888d-cf4e-40cf-bab6-de4ee00d0ceb")
                    {
                        Tracer.Debug("!已获取到(新)流程定义");
                    }
                    if (item.ENTITYMENUID == "709D9380-5405-4429-B047-20100401D255")
                    {
                        Tracer.Debug("!已获取到系统科目字典维护");
                    }
                    else
                    {
                        Tracer.Debug("已获取到菜单:" + item.MENUNAME);
                    }

                    ModuleInfo parentModule = moduleinfos.FirstOrDefault(e => (e.ModuleCode == item.SYSTEMTYPE));

                    ModuleInfo module = new ModuleInfo()
                    {
                        ModuleCode = item.MENUCODE,
                        ModuleIcon = item.MENUICONPATH,
                        ModuleName = item.ENTITYMENUID,
                        ParentModuleID = item.EntityMenuFatherID,
                        ModuleID = item.ENTITYMENUID,
                        SystemType = item.SYSTEMTYPE,
                        ClientID = item.CHILDSYSTEMNAME,
                        ModuleType = item.URLADDRESS,
                        Description = item.MENUNAME,
                        UseState = "0"

                    };

                    if ((childs.Count() > 0))
                    {
                        module.ParentModuleID = item.SYSTEMTYPE;
                    }
                    //配置菜单的依赖系统关系
                    module.DependsOn = new System.Collections.ObjectModel.Collection<string>();
                    if (parentModule != null)
                    {
                        module.DependsOn.Add(parentModule.ModuleName);

                        if (item.CHILDSYSTEMNAME != null)
                        {
                            //SMT.FBAnalysis.UI
                            if (parentModule.ModuleName != item.CHILDSYSTEMNAME && parentModule.ModuleName != "SMT.SaaS.LM.UI")
                            {
                                module.DependsOn.Add(item.CHILDSYSTEMNAME);
                                //Debug.WriteLine(parentModule.ModuleName+" => "+item.CHILDSYSTEMNAME);
                            }
                        }
                    }

                    if (item.URLADDRESS != null)
                    {
                        if (item.URLADDRESS.IndexOf("[mvc]") >= 0)
                            module.ModuleType = item.URLADDRESS;   //增加平台兼容地址获取
                        else
                            RefreshModuleType(parentModule, module, item.CHILDSYSTEMNAME, item.URLADDRESS);
                    }

                    tempModules.Add(module);
                }

                moduleinfos.AddRange(tempModules);
                return moduleinfos;
            }
            catch (Exception ex)
            {
                Tracer.Debug("Dal GetModuleCatalogByUser 异常:" + ex.ToString());
                //throw ex;
                return new List<ModuleInfo>();
            }
            finally
            {
                TimeSpan ts = DateTime.Now.Subtract(dtstart);
                Tracer.Debug("GetModuleCatalogByUser completed !耗时:" + ts.TotalSeconds + "s userSysID:" + userSysID);
            }
        }