提交代码
This commit is contained in:
@@ -624,5 +624,31 @@ namespace BLL
|
||||
{
|
||||
return (Funs.DB.Base_Unit.FirstOrDefault(e => e.UnitId == Const.UnitId_CWCEC)); //本单位
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///根据userid获取当前人的单位类型(0总公司,1分公司,2其他)
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetUnitTypeByUserId(string userId)
|
||||
{
|
||||
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;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(user.UnitId) && UnitService.GetUnitByUnitId(user.UnitId).IsBranch == true && user.IsOffice == true) //子公司级数据
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
else //外来账户
|
||||
{
|
||||
result = 2;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1302,6 +1302,27 @@ namespace BLL
|
||||
|
||||
}
|
||||
|
||||
private static string _SGGLApiUrl;
|
||||
|
||||
public static string SGGLApiUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet = (from x in DB.Sys_Set where x.SetName == "程序接口访问地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet != null)
|
||||
{
|
||||
_SGGLApiUrl = sysSet.SetValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_SGGLApiUrl = "";
|
||||
}
|
||||
|
||||
return _SGGLApiUrl;
|
||||
}
|
||||
set { _SGGLApiUrl = value; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user