Commit f0f8e3a5 by ruyun.zhang@suvalue.com

Merge branch 'v20201230yubei' into v2020morge-graphql

parents e1673a20 6330cc49
...@@ -501,8 +501,8 @@ public List<DeptResponse> GetAdminPerformance(int allotId) ...@@ -501,8 +501,8 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
var employee = clinicalEmployees.FirstOrDefault(e => e.PersonnelNumber == t.JobNumber && e.AccountingUnit == t.AccountingUnit); var employee = clinicalEmployees.FirstOrDefault(e => e.PersonnelNumber == t.JobNumber && e.AccountingUnit == t.AccountingUnit);
var scoreAverageRate = t.ScoreAverageRate ?? employee.ScoreAverageRate ?? 1; var scoreAverageRate = t.ScoreAverageRate ?? employee.ScoreAverageRate ?? 1;
var attendance = t.Attendance ?? employee.Attendance ?? 0; var attendance = t.Attendance ?? employee.Attendance ?? 0;
t.GiveFee = (t.ShouldGiveFee ?? 0) * scoreAverageRate * attendance + (t.OtherPerfor ?? 0) + (t.Punishment ?? 0) + (t.AssessLaterOtherFee ?? 0); t.GiveFee = Math.Round((t.ShouldGiveFee ?? 0) * scoreAverageRate * attendance + (t.Punishment ?? 0) + (t.AssessLaterOtherFee ?? 0), 2);
t.RealGiveFee = t.GiveFee * (t.Adjust ?? 1m) + (t.AdjustLaterOtherFee ?? 0); t.RealGiveFee = Math.Round(t.GiveFee * (t.Adjust ?? 1m) + (t.AdjustLaterOtherFee ?? 0) ?? 0, 2);
} }
}); });
...@@ -732,6 +732,7 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM ...@@ -732,6 +732,7 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
// 预留比例 // 预留比例
if (result != null) if (result != null)
{ {
var types = new string[] { UnitType.行政高层.ToString(), UnitType.行政中层.ToString(), UnitType.行政后勤.ToString(), "行政工勤" };
var empDic = perforPeremployeeRepository.GetEntities(w => w.AllotId == allotId); var empDic = perforPeremployeeRepository.GetEntities(w => w.AllotId == allotId);
foreach (var item in result) foreach (var item in result)
{ {
...@@ -742,10 +743,20 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM ...@@ -742,10 +743,20 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
item.PerforManagementFee = Math.Round((item.PerforManagementFee * adjust ?? 0), 2, MidpointRounding.AwayFromZero); item.PerforManagementFee = Math.Round((item.PerforManagementFee * adjust ?? 0), 2, MidpointRounding.AwayFromZero);
var real = Math.Round((item.PerforSumFee ?? 0) + (item.PerforManagementFee ?? 0) + (item.AdjustLaterOtherFee ?? 0), 2, MidpointRounding.AwayFromZero); var real = Math.Round((item.PerforSumFee ?? 0) + (item.PerforManagementFee ?? 0) + (item.AdjustLaterOtherFee ?? 0), 2, MidpointRounding.AwayFromZero);
// 这里是为了“全院核算绩效发放”金额一致
if (item.Source == "一次绩效")
{
if (isShowManage == 1)
real = Math.Round(real, 0);
else if (types.Contains(item.UnitType))
real = Math.Round(real, 0);
}
item.OthePerfor = Math.Round((item.OthePerfor ?? 0), 2, MidpointRounding.AwayFromZero); item.OthePerfor = Math.Round((item.OthePerfor ?? 0), 2, MidpointRounding.AwayFromZero);
item.NightWorkPerfor = Math.Round((item.NightWorkPerfor ?? 0), 2, MidpointRounding.AwayFromZero); item.NightWorkPerfor = Math.Round((item.NightWorkPerfor ?? 0), 2, MidpointRounding.AwayFromZero);
item.ShouldGiveFee = Math.Round(real + (item.OthePerfor ?? 0) + (item.NightWorkPerfor ?? 0), 2, MidpointRounding.AwayFromZero); item.ShouldGiveFee = Math.Round(real + (item.OthePerfor ?? 0) + (item.NightWorkPerfor ?? 0), 2, MidpointRounding.AwayFromZero);
item.ReservedRatio = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.ReservedRatio ?? 0; item.ReservedRatio = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.ReservedRatio ?? 0;
item.ReservedRatioFee = Math.Round(real * (item.ReservedRatio ?? 0), 2, MidpointRounding.AwayFromZero); item.ReservedRatioFee = Math.Round(real * (item.ReservedRatio ?? 0), 2, MidpointRounding.AwayFromZero);
item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 2, MidpointRounding.AwayFromZero); item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 2, MidpointRounding.AwayFromZero);
...@@ -806,7 +817,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i ...@@ -806,7 +817,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
if (types1.Contains(t.AccountType)) if (types1.Contains(t.AccountType))
{ {
// 等同于考核后管理绩效 AssessLaterManagementFee // 等同于考核后管理绩效 AssessLaterManagementFee
comp.PerforManagementFee = Math.Round(t.ShouldGiveFee * t.ScoreAverageRate * t.Attendance + t.Punishment ?? 0); comp.PerforManagementFee = Math.Round(t.ShouldGiveFee * t.ScoreAverageRate * t.Attendance + t.Punishment ?? 0, 2);
// 仅显示管理绩效 // 仅显示管理绩效
if (isShowManage == 2) if (isShowManage == 2)
comp.PerforSumFee = 0; comp.PerforSumFee = 0;
......
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