Commit e4c901e6 by ruyun.zhang@suvalue.com

Merge branch 'v2020morge' into custom_script

parents e99c2435 bf0799b0
...@@ -230,7 +230,13 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -230,7 +230,13 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
// && (!string.IsNullOrEmpty(w.EmployeeName) || !string.IsNullOrEmpty(w.JobNumber))) // && (!string.IsNullOrEmpty(w.EmployeeName) || !string.IsNullOrEmpty(w.JobNumber)))
// .FirstOrDefault(w => w.AccountingUnit == empolyee.AccountingUnit && w.UnitType == empolyee.UnitType // .FirstOrDefault(w => w.AccountingUnit == empolyee.AccountingUnit && w.UnitType == empolyee.UnitType
// && w.JobNumber == empolyee.JobNumber && w.EmployeeName == empolyee.DoctorName)?.TotelValue; // && w.JobNumber == empolyee.JobNumber && w.EmployeeName == empolyee.DoctorName)?.TotelValue;
var avg = (group.Number == 0 ? 0 : (sumValue / group.Number)); //var avg = (group.Number == 0 ? 0 : (sumValue / group.Number));
// 优先取 实际人均绩效
var avg = (empolyee.FitPeopleValue.HasValue)
? empolyee.FitPeopleValue
: group.Number == 0 ? 0 : sumValue / group.Number;
var empolyeeAdjust = isBudget ? adjust : empolyee.Adjust; var empolyeeAdjust = isBudget ? adjust : empolyee.Adjust;
var compute = new ComputeResult var compute = new ComputeResult
{ {
...@@ -241,7 +247,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -241,7 +247,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
EmployeeName = empolyee.DoctorName, EmployeeName = empolyee.DoctorName,
FitPeople = empolyee.FitPeople, FitPeople = empolyee.FitPeople,
JobTitle = empolyee.JobTitle, JobTitle = empolyee.JobTitle,
JobNumber = empolyee.JobNumber,
ScoreAverageRate = empolyee.ScoreAverageRate, ScoreAverageRate = empolyee.ScoreAverageRate,
Punishment = 0, Punishment = 0,
//OtherPerfor = empolyee.OtherPerfor, //OtherPerfor = empolyee.OtherPerfor,
...@@ -259,7 +265,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -259,7 +265,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
Scale = sumValue * (empolyee.Scale ?? 0), Scale = sumValue * (empolyee.Scale ?? 0),
}; };
compute.Avg = (group.Number == 0 ? 0 : (sumValue / group.Number)) * (empolyee.Basics ?? 0) * compute.Attendance; compute.Avg = avg * (empolyee.Basics ?? 0) * compute.Attendance;
// 考核前管理绩效 // 考核前管理绩效
compute.ShouldGiveFee = Math.Round((compute.Efficiency + compute.Scale) * compute.Grant + compute.OtherManagePerfor ?? 0); compute.ShouldGiveFee = Math.Round((compute.Efficiency + compute.Scale) * compute.Grant + compute.OtherManagePerfor ?? 0);
// 考核后管理绩效 // 考核后管理绩效
......
...@@ -469,18 +469,19 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM ...@@ -469,18 +469,19 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
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)
{ {
item.PerforSumFee = Math.Round(item.PerforSumFee ?? 0, 0, MidpointRounding.AwayFromZero); // 二次分配默认 调节系数100%
item.PerforManagementFee = Math.Round(item.PerforManagementFee ?? 0, 0, MidpointRounding.AwayFromZero); var adjust = item.Source == "二次绩效" ? 1 : (item.Adjust ?? 1);
// 计算调节后业绩绩效、管理绩效
item.PerforSumFee = Math.Round((item.PerforSumFee * adjust ?? 0), 0, MidpointRounding.AwayFromZero);
item.PerforManagementFee = Math.Round((item.PerforManagementFee * adjust ?? 0), 0, MidpointRounding.AwayFromZero);
//二次分配默认 调节系数100% var real = Math.Round((item.PerforSumFee ?? 0) + (item.PerforManagementFee ?? 0) + (item.AdjustLaterOtherFee ?? 0), 0);
item.Adjust = item.Source == "二次绩效" ? 1 : item.Adjust;
var real = Math.Round((item.PerforSumFee ?? 0) + (item.PerforManagementFee ?? 0), 0) * item.Adjust + (item.AdjustLaterOtherFee ?? 0);
item.OthePerfor = Math.Round((item.OthePerfor ?? 0), 0, MidpointRounding.AwayFromZero); item.OthePerfor = Math.Round((item.OthePerfor ?? 0), 0, MidpointRounding.AwayFromZero);
item.NightWorkPerfor = Math.Round((item.NightWorkPerfor ?? 0), 0, MidpointRounding.AwayFromZero); item.NightWorkPerfor = Math.Round((item.NightWorkPerfor ?? 0), 0, MidpointRounding.AwayFromZero);
item.ShouldGiveFee = Math.Round((real ?? 0) + (item.OthePerfor ?? 0) + (item.NightWorkPerfor ?? 0), 0, MidpointRounding.AwayFromZero); item.ShouldGiveFee = Math.Round(real + (item.OthePerfor ?? 0) + (item.NightWorkPerfor ?? 0), 0, 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 ?? 0) * (item.ReservedRatio ?? 0), 0, MidpointRounding.AwayFromZero); item.ReservedRatioFee = Math.Round(real * (item.ReservedRatio ?? 0), 0, MidpointRounding.AwayFromZero);
item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 0, MidpointRounding.AwayFromZero); item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 0, MidpointRounding.AwayFromZero);
} }
} }
......
...@@ -360,7 +360,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS ...@@ -360,7 +360,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
if (basicRule == null) continue; if (basicRule == null) continue;
// 优先取 实际人均绩效 // 优先取 实际人均绩效
var avg = (empolyee.FitPeopleValue.HasValue && empolyee.FitPeopleValue > 0) var avg = (empolyee.FitPeopleValue.HasValue)
? empolyee.FitPeopleValue ? empolyee.FitPeopleValue
: resAccount.Number == 0 ? 0 : resAccount.PerforTotal / resAccount.Number; : resAccount.Number == 0 ? 0 : resAccount.PerforTotal / resAccount.Number;
var effAvg = empolyee.PermanentStaff == 0 ? 0 : resAccount.PerforTotal / empolyee.PermanentStaff; var effAvg = empolyee.PermanentStaff == 0 ? 0 : resAccount.PerforTotal / empolyee.PermanentStaff;
...@@ -417,7 +417,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS ...@@ -417,7 +417,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
// 参考基数专用绩效合计 // 参考基数专用绩效合计
compute.BaiscNormPerforTotal = compute.PerforSumFee; compute.BaiscNormPerforTotal = compute.PerforSumFee;
// 实发绩效 // 实发绩效
compute.RealGiveFee = Math.Round(((compute.Avg ?? 0) + (compute.AssessLaterManagementFee ?? 0)) * compute.Adjust + (compute.AdjustLaterOtherFee??0) ?? 0); compute.RealGiveFee = Math.Round(((compute.Avg ?? 0) + (compute.AssessLaterManagementFee ?? 0)) * compute.Adjust + (compute.AdjustLaterOtherFee ?? 0) ?? 0);
////绩效合计 ////绩效合计
//compute.PerforSumFee = Math.Round((compute.Avg * (empolyee.Basics ?? 0)) + compute.ShouldGiveFee + compute.AssessBeforeOtherFee ?? 0); //compute.PerforSumFee = Math.Round((compute.Avg * (empolyee.Basics ?? 0)) + compute.ShouldGiveFee + compute.AssessBeforeOtherFee ?? 0);
......
...@@ -1713,7 +1713,7 @@ public List<SecPrintResponse> Print(int secondId) ...@@ -1713,7 +1713,7 @@ public List<SecPrintResponse> Print(int secondId)
} }
else else
{ {
var itemname = new List<string> { "人员工号", "姓名", "职称", "职称绩效", "工作量绩效工资", "科室单项奖励", "可分配绩效", "医院其他绩效", "夜班工作量绩效" }; var itemname = new List<string> { "人员工号", "姓名", "职称", "职称绩效", "工作量绩效工资", "单项奖励小计", "可分配绩效", "医院其他绩效", "夜班工作量绩效" };
var fixaitems = perforAgfixatitemRepository.GetEntities(t => t.SecondId == secondId && itemname.Contains(t.ItemName)); var fixaitems = perforAgfixatitemRepository.GetEntities(t => t.SecondId == secondId && itemname.Contains(t.ItemName));
if (fixaitems == null && !fixaitems.Any(t => t.RowNumber.HasValue && t.RowNumber != -1)) return new List<SecPrintResponse>(); if (fixaitems == null && !fixaitems.Any(t => t.RowNumber.HasValue && t.RowNumber != -1)) return new List<SecPrintResponse>();
...@@ -1734,7 +1734,7 @@ public List<SecPrintResponse> Print(int secondId) ...@@ -1734,7 +1734,7 @@ public List<SecPrintResponse> Print(int secondId)
sec.WorkPost = fixaitems.FirstOrDefault(t => t.RowNumber == rownumber && t.ItemName == "职称")?.ItemValue; sec.WorkPost = fixaitems.FirstOrDefault(t => t.RowNumber == rownumber && t.ItemName == "职称")?.ItemValue;
sec.TitlePerfor = ConvertHelper.To<decimal?>(fixaitems.FirstOrDefault(t => t.RowNumber == rownumber && t.ItemName == "职称绩效")?.ItemValue); sec.TitlePerfor = ConvertHelper.To<decimal?>(fixaitems.FirstOrDefault(t => t.RowNumber == rownumber && t.ItemName == "职称绩效")?.ItemValue);
sec.WorkPerformance = ConvertHelper.To<decimal?>(fixaitems.FirstOrDefault(t => t.RowNumber == rownumber && t.ItemName == "工作量绩效工资")?.ItemValue); sec.WorkPerformance = ConvertHelper.To<decimal?>(fixaitems.FirstOrDefault(t => t.RowNumber == rownumber && t.ItemName == "工作量绩效工资")?.ItemValue);
sec.DeptReward = ConvertHelper.To<decimal?>(fixaitems.FirstOrDefault(t => t.RowNumber == rownumber && t.ItemName == "科室单项奖励")?.ItemValue); sec.DeptReward = ConvertHelper.To<decimal?>(fixaitems.FirstOrDefault(t => t.RowNumber == rownumber && t.ItemName == "单项奖励小计")?.ItemValue);
sec.DistPerformance = distperfor; sec.DistPerformance = distperfor;
sec.OtherPerformance = ConvertHelper.To<decimal?>(fixaitems.FirstOrDefault(t => t.RowNumber == rownumber && t.ItemName == "医院其他绩效")?.ItemValue); sec.OtherPerformance = ConvertHelper.To<decimal?>(fixaitems.FirstOrDefault(t => t.RowNumber == rownumber && t.ItemName == "医院其他绩效")?.ItemValue);
sec.NightWorkPerformance = nightworkperfor; sec.NightWorkPerformance = nightworkperfor;
......
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