管理绩效兼容“科主任/护士长”

parent f4f9fa75
...@@ -2376,17 +2376,17 @@ public List<DeptDataDetails> DeptComputeDetailList(int userId, int allotId, out ...@@ -2376,17 +2376,17 @@ public List<DeptDataDetails> DeptComputeDetailList(int userId, int allotId, out
var userrole = userroleRepository.GetEntity(t => t.UserID == userId); var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID); var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID);
Dictionary<int, string> dict = new Dictionary<int, string> Dictionary<int, List<string>> dict = new Dictionary<int, List<string>>
{ {
{ application.DirectorRole, AccountUnitType.科主任.ToString() }, { application.DirectorRole, new List<string>{ AccountUnitType.科主任.ToString()} },
{ application.NurseRole, AccountUnitType.护士长.ToString() }, { application.NurseRole, new List<string>{ AccountUnitType.护士长.ToString() } },
{ application.OfficeRole, AccountUnitType.行政中层.ToString() }, { application.OfficeRole, new List<string> { AccountUnitType.行政中层.ToString() } },
{ application.SpecialRole, AccountUnitType.科主任.ToString() }, { application.SpecialRole, new List<string> { AccountUnitType.科主任.ToString() , AccountUnitType.护士长.ToString() } },
}; };
if (!dict.Keys.Contains(role.Type.Value)) return new List<DeptDataDetails>(); if (!dict.Keys.Contains(role.Type.Value)) return new List<DeptDataDetails>();
var computes = rescomputeRepository.GetEntities(t => t.AllotID == allotId && t.AccountingUnit == user.Department && t.AccountType == dict[role.Type.Value]); var computes = rescomputeRepository.GetEntities(t => t.AllotID == allotId && t.AccountingUnit == user.Department && dict[role.Type.Value].Contains(t.AccountType));
if (computes == null || !computes.Any()) return new List<DeptDataDetails>(); if (computes == null || !computes.Any()) return new List<DeptDataDetails>();
foreach (var item in computes) foreach (var item in computes)
{ {
......
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