录入科室自动带出登录名

parent 259016d2
...@@ -729,18 +729,8 @@ public view_per_apr_amount GetEmployeeMessage(int allotId, string personnelNumbe ...@@ -729,18 +729,8 @@ public view_per_apr_amount GetEmployeeMessage(int allotId, string personnelNumbe
/// <returns></returns> /// <returns></returns>
public string GetTypeInDepartment(int userId) public string GetTypeInDepartment(int userId)
{ {
var userrole = userroleRepository.GetEntity(t => t.UserID == userId); var user = userRepository.GetEntity(t => t.ID == userId);
if (userrole == null) throw new PerformanceException("用户未绑定角色"); return user?.Login ?? "";
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;
} }
#region 科室考核 #region 科室考核
...@@ -928,7 +918,7 @@ public bool ConfirmAuditHide(int userid, AprAmountAuditRequest request) ...@@ -928,7 +918,7 @@ public bool ConfirmAuditHide(int userid, AprAmountAuditRequest request)
} }
} }
return true; return true;
} }
/// <summary> /// <summary>
/// 上传导入医院其他绩效 /// 上传导入医院其他绩效
......
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