Commit 1cd79ae3 by 纪旭 韦

Merge branch 'feature/医技组科室绩效' into feature/用于合并

parents 4b92abd0 3c4292a9
......@@ -74,6 +74,22 @@ public ApiResponse<List<res_specialunit>> GetSpecial([FromBody] ComputerRequest
}
/// <summary>
/// 医技组科室绩效列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("getmedicaldata")]
[HttpPost]
public ApiResponse<List<DeptResponse>> GetMedicalTechnician([FromBody] ComputerRequest request)
{
var allot = _allotService.GetAllot(request.AllotId);
if (null == allot)
throw new PerformanceException("当前绩效记录不存在");
var list = _computeService.GetMedicalPerformance(request.AllotId);
return new ApiResponse<List<DeptResponse>>(ResponseType.OK, "ok", list);
}
/// <summary>
/// 医生组科室绩效列表
/// </summary>
/// <param name="request"></param>
......
......@@ -440,6 +440,13 @@
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ComputeController.GetMedicalTechnician(Performance.DtoModels.ComputerRequest)">
<summary>
医技组科室绩效列表
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ComputeController.GetDoctor(Performance.DtoModels.ComputerRequest)">
<summary>
医生组科室绩效列表
......
......@@ -272,17 +272,24 @@ public List<res_specialunit> GetSpecial(int allotId)
}
/// <summary>
/// 返回医技组科室绩效
/// </summary>
/// <param name="allotId">绩效ID</param>
/// <returns></returns>
public List<DeptResponse> GetMedicalPerformance(int allotId)
{
return GetGroupPerformance(allotId, new List<int> { (int)UnitType.医技组 });
}
/// <summary>
/// 返回医生组科室绩效
/// </summary>
/// <param name="allotId">绩效ID</param>
/// <returns></returns>
public List<DeptResponse> GetDoctorPerformance(int allotId)
{
List<int> types = new List<int> { (int)UnitType.医生组, (int)UnitType.医技组 };
var list = perforResaccountRepository.GetEntities(t => types.Contains(t.UnitType.Value) && t.AllotID == allotId)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit);
List<DeptResponse> doctor = _mapper.Map<List<DeptResponse>>(list);
doctor?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return doctor;
return GetGroupPerformance(allotId, new List<int> { (int)UnitType.医生组 });
}
/// <summary>
......@@ -292,10 +299,7 @@ public List<DeptResponse> GetDoctorPerformance(int allotId)
/// <returns></returns>
public List<DeptResponse> GetNursePerformance(int allotId)
{
var list = perforResaccountRepository.GetEntities(t => t.UnitType == (int)UnitType.护理组 && t.AllotID == allotId)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit);
List<DeptResponse> nurse = _mapper.Map<List<DeptResponse>>(list);
nurse?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return nurse;
return GetGroupPerformance(allotId, new List<int> { (int)UnitType.护理组 });
}
/// <summary>
......@@ -305,13 +309,16 @@ public List<DeptResponse> GetNursePerformance(int allotId)
/// <returns></returns>
public List<DeptResponse> GetOtherPerformance(int allotId)
{
var unitType = new List<int> { (int)UnitType.其他医技组, (int)UnitType.其他医生组, (int)UnitType.其他护理组, (int)UnitType.专家组 };
return GetGroupPerformance(allotId, new List<int> { (int)UnitType.其他医技组, (int)UnitType.其他医生组, (int)UnitType.其他护理组, (int)UnitType.专家组 });
}
public List<DeptResponse> GetGroupPerformance(int allotId, List<int> group)
{
var unitType = group;
var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit);
List<DeptResponse> other = _mapper.Map<List<DeptResponse>>(list);
other?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return other;
List<DeptResponse> Performance = _mapper.Map<List<DeptResponse>>(list);
Performance?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return Performance;
}
/// <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