Commit 4f0bee3d by ruyun.zhang@suvalue.com

Merge remote-tracking branch 'origin/v2020morge' into v2020morge

parents 135e22c5 1e1b69b5
......@@ -295,6 +295,7 @@ public ApiResponse AllComputeByPM([FromBody] ComputerRequest request)
OthePerfor = t.Sum(s => s.OthePerfor),
NightWorkPerfor = t.Sum(s => s.NightWorkPerfor),
RealGiveFee = t.Sum(s => s.RealGiveFee),
JobTitle = t.FirstOrDefault(f => !string.IsNullOrEmpty(f.JobTitle))?.JobTitle
//ReservedRatio = t.Sum(s => s.ReservedRatio),
//ReservedRatioFee = t.Sum(s => s.ReservedRatioFee),
});
......
......@@ -251,7 +251,6 @@ public ApiResponse Audit(int allotid)
return result ? new ApiResponse(ResponseType.OK, "提交成功") : new ApiResponse(ResponseType.Fail, "提交失败");
}
/// <summary>
/// 获取人员补充绩效列表
/// </summary>
......@@ -269,6 +268,61 @@ public ApiResponse GetAprList([FromBody] per_apr_amount request)
}
/// <summary>
/// 医院其他绩效审核
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("apr/getdeptlist")]
[HttpPost]
public ApiResponse GetAprGroupList([FromBody] per_apr_amount request)
{
if (request.AllotId == 0)
return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
var employee = employeeService.GetAprList(request.AllotId);
if (employee == null || !employee.Any())
return new ApiResponse(ResponseType.OK, "ok", employee);
var result = employee.GroupBy(t => new { t.AccountingUnit, t.TypeInDepartment }).Select(t => new per_apr_amount
{
AccountingUnit = t.Key.AccountingUnit,
TypeInDepartment = t.Key.TypeInDepartment,
Amount = t.Sum(s => s.Amount ?? 0),
Status = t.Any(s => s.Status == 2) ? 2 : t.Any(s => s.Status == 4) ? 4 : t.FirstOrDefault().Status
});
return new ApiResponse(ResponseType.OK, "ok", result);
}
/// <summary>
/// 医院其他绩效审核详情
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("apr/getdeptdetail")]
[HttpPost]
public ApiResponse GetAprDetail([FromBody] per_apr_amount request)
{
if (request.AllotId == 0)
return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
var employee = employeeService.GetAprList(request.AllotId, request.AccountingUnit, request.TypeInDepartment);
if (employee == null || !employee.Any())
return new ApiResponse(ResponseType.OK, "ok", employee);
var result = employee.GroupBy(t => new { t.PersonnelNumber, t.DoctorName }).Select(t => new
{
PersonnelNumber = t.Key.PersonnelNumber,
DoctorName = t.Key.DoctorName,
Detail = t.GroupBy(group => group.PerforType).Select(s => new TitleValue<decimal>
{
Title = s.Key,
Value = s.Sum(sum => sum.Amount ?? 0)
})
});
return new ApiResponse(ResponseType.OK, "ok", result);
}
/// <summary>
/// 新增人员补充绩效
/// </summary>
/// <param name="request"></param>
......
......@@ -699,6 +699,20 @@
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetAprGroupList(Performance.EntityModels.per_apr_amount)">
<summary>
获取人员补充绩效列表
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetAprDetail(Performance.EntityModels.per_apr_amount)">
<summary>
获取人员补充绩效列表
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.InsertApr(Performance.EntityModels.per_apr_amount)">
<summary>
新增人员补充绩效
......
......@@ -383,6 +383,15 @@ public List<per_apr_amount> GetAprList(int allotId)
return list;
}
public List<per_apr_amount> GetAprList(int allotId, string accountingUnit, string department)
{
var list = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.AccountingUnit == accountingUnit && t.TypeInDepartment == department);
if (list != null && list.Any())
list = list.OrderBy(t => t.DoctorName).ToList();
return list;
}
public bool InsertApr(per_apr_amount request, int userId)
{
if (request == null)
......
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