提交代码

This commit is contained in:
2024-12-25 15:43:38 +08:00
parent 0a2f9ea3a7
commit c0b489aaf4
79 changed files with 8536 additions and 1546 deletions
+26
View File
@@ -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;
}
}
}