Commit 526146dd by lcx

二次绩效计算、加载数据异常

parent 8f90f001
......@@ -280,6 +280,8 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
private List<Dictionary<string, object>> LoadWorkload(per_allot allot, ag_secondallot second, List<ag_bodysource> loadEmployees, bool isSave = true, EmployeeSource overrideMode = 0)
{
List<Dictionary<string, object>> result = new List<Dictionary<string, object>>();
if (loadEmployees == null || !loadEmployees.Any()) return result;
var status = (new int[] { (int)SecondAllotStatus.WaitReview, (int)SecondAllotStatus.PassAudit });
// 已提交
if (second.Status.HasValue && status.Contains(second.Status.Value))
......@@ -980,11 +982,8 @@ private void overviewCalculate(Dictionary<string, object> head, List<Dictionary<
//// 夜班工作量绩效总和
//var nightShiftWorkPerforTotal = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.NightWorkPerformance)));
//head.AddOrUpdate(nameof(ag_headsource.NightShiftWorkPerforTotal), nightShiftWorkPerforTotal);
// 科室考核前奖励
var totalPreAccountingReward = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.PreDeptReward)));
head.AddOrUpdate(nameof(ag_headsource.TotalPreAccountingReward), totalPreAccountingReward);
// 可分配绩效(顶栏) = 科室总绩效 - 夜班绩效(顶栏) - 科室考核前奖励
var totalPerformance = GetDecimal2(head, nameof(ag_headsource.TotalDistPerformance)) - GetDecimal2(head, nameof(ag_headsource.NightShiftWorkPerforTotal)) - totalPreAccountingReward;
// 可分配绩效(顶栏) = 科室总绩效 - 夜班绩效(顶栏)
var totalPerformance = GetDecimal2(head, nameof(ag_headsource.TotalDistPerformance)) - GetDecimal2(head, nameof(ag_headsource.NightShiftWorkPerforTotal));
head.AddOrUpdate(nameof(ag_headsource.TotalPerformance), totalPerformance);
//// 医院其他绩效总和
//var otherPerformance = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.OtherPerformance)));
......@@ -999,11 +998,14 @@ private void overviewCalculate(Dictionary<string, object> head, List<Dictionary<
// 科室单项奖励
var totalDeptReward = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.DeptReward)));
head.AddOrUpdate(nameof(ag_headsource.TotalDeptReward), totalDeptReward);
// 科室考核前奖励
var totalPreAccountingReward = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.PreDeptReward)));
head.AddOrUpdate(nameof(ag_headsource.TotalPreAccountingReward), totalPreAccountingReward);
// 主任基础绩效(顶部) = 行内主任基础绩效总和
var directorBasisPerformance = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.BasisPerformance)));
head.AddOrUpdate(nameof(ag_headsource.DirectorBasisPerformance), directorBasisPerformance);
// 业绩分配绩效总额 = 可分配绩效 - 科主任或护士长基础绩效 - 科室单项奖励
var theTotalAllocationOfPerformanceResults = totalPerformance - directorBasisPerformance - totalDeptReward;
// 业绩分配绩效总额 = 可分配绩效 - 科主任或护士长基础绩效 - 科室单项奖励 - 科室考核前奖励
var theTotalAllocationOfPerformanceResults = totalPerformance - directorBasisPerformance - totalDeptReward - totalPreAccountingReward;
head.AddOrUpdate(nameof(ag_headsource.TheTotalAllocationOfPerformanceResults), theTotalAllocationOfPerformanceResults);
}
......@@ -1206,8 +1208,8 @@ private void distPerformanceCalculate(List<Dictionary<string, object>> rows)
var deptReward = GetDecimal2(row, nameof(ag_bodysource.DeptReward));
var preDeptReward = GetDecimal2(row, nameof(ag_bodysource.PreDeptReward));
var basisPerformance = GetDecimal2(row, nameof(ag_bodysource.BasisPerformance));
// 可分配绩效 =   当前行职称绩效 + 工作量绩效工资 + 当前行单项奖励 + 当前行主任基础绩效 (科主任护士长)- 考核前奖励
var distPerformance = titlePerformance + workPerformance + deptReward + basisPerformance - preDeptReward;
// 可分配绩效 =   当前行职称绩效 + 工作量绩效工资 + 当前行单项奖励 + 当前行主任基础绩效 (科主任护士长)
var distPerformance = titlePerformance + workPerformance + deptReward + basisPerformance + preDeptReward;
row.AddOrUpdate(nameof(ag_bodysource.DistPerformance), distPerformance);
}
}
......
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