冗余代码清理

This commit is contained in:
2026-06-15 19:05:39 +08:00
parent 1fd3ca5094
commit eacb45828c
57 changed files with 134 additions and 31930 deletions
+5 -25
View File
@@ -26,10 +26,6 @@ namespace BLL
{
return new List<string>() { Const.Menu_Server, Const.Menu_HSSE, Const.Menu_CQMS, Const.Menu_HJGL };
}
else if (userId == Const.sedinId)
{
return new List<string>() { Const.Menu_CQMS };
}
else
{
List<string> returnList = new List<string>();
@@ -110,7 +106,7 @@ namespace BLL
|| x.MenuType == Const.Menu_PZHGL)
select x;
List<Model.Sys_Menu> menus = new List<Model.Sys_Menu>();
if (userId == Const.sysglyId || userId == Const.hfnbdId || userId == Const.sedinId)
if (userId == Const.sysglyId || userId == Const.hfnbdId)
{
menus = getMenus.ToList();
}
@@ -173,15 +169,7 @@ namespace BLL
{
///1、当前用户是管理员
///2、当前菜单是个人设置
if (userId == Const.sysglyId || userId == Const.hfnbdId || userId == Const.sedinId)
{
returnValue = true;
}
else if (userId == Const.sedinId)
{
returnValue = true;
}
else if (menu.MenuType == Const.Menu_Personal)
if (userId == Const.sysglyId || userId == Const.hfnbdId)
{
returnValue = true;
}
@@ -225,10 +213,6 @@ namespace BLL
try
{
List<Model.Sys_ButtonToMenu> buttons = new List<Model.Sys_ButtonToMenu>();
if (userId == Const.sedinId)
{
return buttonList;
}
var getMenu = Funs.DB.Sys_Menu.FirstOrDefault(x => x.MenuId == menuId);
var user = BLL.UserService.GetUserByUserId(userId); ////用户
@@ -289,11 +273,7 @@ namespace BLL
public static bool GetAllButtonPowerList(string projectId, string userId, string menuId, string buttonName)
{
Model.CNPCDB db = Funs.DB;
bool isPower = false; ////定义是否具备按钮权限
if (userId == Const.sedinId)
{
return isPower;
}
bool isPower = false; ////定义是否具备按钮权限
if (!isPower && (userId == Const.sysglyId || userId == Const.hfnbdId))
{
isPower = true;
@@ -382,7 +362,7 @@ namespace BLL
public static bool IsThisUnitLeaderOfficeOrManage(string userId)
{
bool result = false;
if (userId == Const.sysglyId || userId == Const.hfnbdId || userId == Const.sedinId)
if (userId == Const.sysglyId || userId == Const.hfnbdId )
{
result = true;
}
@@ -414,7 +394,7 @@ namespace BLL
var getUser = db.Sys_User.FirstOrDefault(x => x.UserId == userId);
if (getUser != null)
{
if (userId == Const.sysglyId || userId == Const.hfnbdId || userId == Const.sedinId)
if (userId == Const.sysglyId || userId == Const.hfnbdId )
{
isHave = true;
}