数据大屏优化
This commit is contained in:
@@ -137,8 +137,6 @@ namespace BLL
|
||||
{
|
||||
int result = 0;
|
||||
var user = UserService.GetUserByUserId(userId);
|
||||
|
||||
|
||||
if ((userId == Const.hfnbdId || userId == Const.sysglyId) || (!string.IsNullOrEmpty(user.UnitId) && user.UnitId == CommonService.GetThisUnitId()))//公司级别
|
||||
{
|
||||
result = 0;
|
||||
@@ -154,6 +152,30 @@ namespace BLL
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据unitId获取当前的单位类型(0总公司,1分公司,2其他)
|
||||
/// </summary>
|
||||
/// <param name="unitId"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetUnitTypeByUnitId(string unitId)
|
||||
{
|
||||
int result = 0;
|
||||
//var unit = UnitService.GetUnitByUnitId(unitId);
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId == CommonService.GetThisUnitId())//公司级别
|
||||
{
|
||||
result = 0;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(unitId) && UnitService.GetUnitByUnitId(unitId).IsBranch == true) //子公司级数据
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
else //外来账户
|
||||
{
|
||||
result = 2;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#region 根据登陆id菜单id判断是否有权限
|
||||
/// <summary>
|
||||
/// 根据登陆id菜单id判断是否有权限
|
||||
@@ -265,11 +287,12 @@ namespace BLL
|
||||
#region 用户Id判断
|
||||
|
||||
#region 根据用户ID判断是超管
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户ID判断是超管
|
||||
/// 部分人员账号给超管权限控制
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool IsSuperAdminManage(string userId)
|
||||
public static bool IsSuperAdminManageAuth(string userId)
|
||||
{
|
||||
bool result = false;
|
||||
if (userId == Const.luofeiId || userId == Const.shizhiyangId || userId == Const.hfnbdId || userId == Const.sysglyId)
|
||||
@@ -278,6 +301,21 @@ namespace BLL
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户ID判断是超管
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool IsSuperAdminManage(string userId)
|
||||
{
|
||||
bool result = false;
|
||||
if (userId == Const.hfnbdId || userId == Const.sysglyId)
|
||||
{//JT、管理员账号
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 获取当前人是否具有按钮操作权限
|
||||
|
||||
Reference in New Issue
Block a user