Commit f460e96e by lcx

二次绩效-管理绩效接口调整

parent 2a027676
......@@ -446,7 +446,8 @@ public ApiResponse SecondPrint(int secondid)
public ApiResponse DeptComputeDetail(int allotId)
{
var userId = claimService.GetUserId();
var data = secondAllotService.DeptComputeDetail(userId, allotId, out int isShowManage);
//var data = secondAllotService.DeptComputeDetail(userId, allotId, out int isShowManage);
var data = secondAllotService.DeptComputeDetailList(userId, allotId, out int isShowManage);
return new ApiResponse(ResponseType.OK, new { isShowManage, data });
}
}
......
......@@ -1796,6 +1796,37 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId, out
return result;
}
public List<DeptDataDetails> DeptComputeDetailList(int userId, int allotId, out int isShowManage)
{
var user = perforUserRepository.GetEntity(t => t.ID == userId);
if (user == null)
throw new NotImplementedException("人员ID无效");
var deptDatas = new List<DeptDataDetails>();
var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId);
isShowManage = computeService.IsShowManage(allotId);
var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID);
Dictionary<int, string> dict = new Dictionary<int, string>
{
{ application.DirectorRole, AccountUnitType.科主任.ToString() },
{ application.NurseRole, AccountUnitType.护士长.ToString() },
{ application.OfficeRole, AccountUnitType.行政中层.ToString() },
{ application.SpecialRole, AccountUnitType.科主任.ToString() },
};
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]);
if (computes == null || !computes.Any()) return new List<DeptDataDetails>();
foreach (var item in computes)
{
deptDatas.Add(computeService.GetDoctorDetail(item.ID));
}
return deptDatas;
}
/// <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