Commit 7db4a3bf by 李承祥

其他组科室绩效

parent 548efcab
......@@ -95,6 +95,22 @@ public ApiResponse<List<DeptResponse>> GetNurse([FromBody]ComputerRequest reques
}
/// <summary>
/// 其他组科室绩效列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("getotherdata")]
[HttpPost]
public ApiResponse<List<DeptResponse>> GetOther([FromBody]ComputerRequest request)
{
var allot = _allotService.GetAllot(request.AllotId);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在");
var list = _computeService.GetOtherPerformance(request.AllotId);
return new ApiResponse<List<DeptResponse>>(ResponseType.OK, "ok", list);
}
/// <summary>
/// 科室绩效详情
/// </summary>
/// <param name="request"></param>
......
......@@ -116,6 +116,20 @@ public List<DeptResponse> GetNursePerformance(int allotId)
}
/// <summary>
/// 返回其他组科室绩效
/// </summary>
/// <param name="allotId">绩效ID</param>
/// <returns></returns>
public List<DeptResponse> GetOtherPerformance(int allotId)
{
var unitType = new List<int> { (int)UnitType.其他组, (int)UnitType.专家组 };
var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId)?.OrderByDescending(t => t.AccountingUnit);
List<DeptResponse> other = Mapper.Map<List<DeptResponse>>(list);
other?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return other;
}
/// <summary>
/// 查看科室绩效
/// </summary>
/// <param name="allotId"></param>
......
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