录入科室自动带出登录名

parent 259016d2
......@@ -729,18 +729,8 @@ public view_per_apr_amount GetEmployeeMessage(int allotId, string personnelNumbe
/// <returns></returns>
public string GetTypeInDepartment(int userId)
{
var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
if (userrole == null) throw new PerformanceException("用户未绑定角色");
string typeIn = "";
// 护士长/科主任/特殊科室/行政科室 录入科室为核算单元
if (new int[] { 3, 4, 9, 10 }.Contains(userrole.RoleID))
typeIn = userRepository.GetEntity(w => w.ID == userId)?.Department ?? "";
// 非 护士长/科主任/特殊科室/行政科室 则为角色名称
else
typeIn = _roleRepository.GetEntity(w => w.ID == userrole.RoleID)?.RoleName ?? "";
return typeIn;
var user = userRepository.GetEntity(t => t.ID == userId);
return user?.Login ?? "";
}
#region 科室考核
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment