提交代码
This commit is contained in:
@@ -665,5 +665,31 @@ namespace BLL
|
||||
if (now.Month < birthDate.Month || (now.Month == birthDate.Month && now.Day < birthDate.Day)) age--;
|
||||
return age;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///根据userid获取当前人的单位类型(0总公司,1分公司,2其他)
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetUnitTypeByUserId(string userId)
|
||||
{
|
||||
int result = 0;
|
||||
var user = Person_PersonsService.GetPerson_PersonsById(userId);
|
||||
|
||||
|
||||
if ((userId == Const.hfnbdId || userId == Const.sysglyId) || (!string.IsNullOrEmpty(user.UnitId) && user.UnitId == BLL.Const.UnitId_SEDIN))//公司级别
|
||||
{
|
||||
result = 0;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(user.UnitId) && UnitService.GetUnitByUnitId(user.UnitId).IsBranch == true && user.IsOffice == true) //子公司级数据
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
else //外来账户
|
||||
{
|
||||
result = 2;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -397,6 +397,10 @@ namespace BLL
|
||||
/// 穿透界面Referer白名单
|
||||
/// </summary>
|
||||
public const string Group_SafeReferer = "SafeReferer";
|
||||
/// <summary>
|
||||
/// 项目细分状态
|
||||
/// </summary>
|
||||
public const string GroupId_ProjectState = "ProjectState";
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1530,7 +1530,26 @@ namespace BLL
|
||||
return weekOfYear;
|
||||
}
|
||||
|
||||
private static string _SGGLApiUrl;
|
||||
|
||||
public static string SGGLApiUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet = (from x in DB.Sys_Const where x.ConstText == "程序接口访问地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet != null)
|
||||
{
|
||||
_SGGLApiUrl = sysSet.ConstValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_SGGLApiUrl = "";
|
||||
}
|
||||
|
||||
return _SGGLApiUrl;
|
||||
}
|
||||
set { _SGGLApiUrl = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user