中高层奖罚BUG修复

parent f1a8ae87
...@@ -305,9 +305,9 @@ public void Save(List<PerSheet> perSheets, int allotId) ...@@ -305,9 +305,9 @@ public void Save(List<PerSheet> perSheets, int allotId)
dept.AdjustFactor = dept.AdjustFactor == 0m ? 1 : dept.AdjustFactor; dept.AdjustFactor = dept.AdjustFactor == 0m ? 1 : dept.AdjustFactor;
dept.Income = econDoctor?.CellValue ?? 0; dept.Income = econDoctor?.CellValue ?? 0;
dept.WorkloadFee = workDoctor?.CellValue ?? 0; dept.WorkloadFee = workDoctor?.CellValue ?? 0;
dept.AssessBeforeOtherFee = dept.AssessBeforeOtherFee ?? 0; dept.AssessBeforeOtherFee = dept?.AssessBeforeOtherFee ?? 0;
dept.AssessLaterOtherFee = dept.AssessLaterOtherFee ?? 0; dept.AssessLaterOtherFee = dept?.AssessLaterOtherFee ?? 0;
dept.AdjustLaterOtherFee = dept.AdjustLaterOtherFee ?? 0; dept.AdjustLaterOtherFee = dept?.AdjustLaterOtherFee ?? 0;
dept.Extra = (extra ?? 0); dept.Extra = (extra ?? 0);
dept.MedicineExtra = (drugExtra ?? 0); dept.MedicineExtra = (drugExtra ?? 0);
dept.MaterialsExtra = (materialsExtra ?? 0); dept.MaterialsExtra = (materialsExtra ?? 0);
...@@ -404,9 +404,14 @@ public IEnumerable<AccountUnitTotal> GetAccountExtra(PerExcel excel, SheetType s ...@@ -404,9 +404,14 @@ public IEnumerable<AccountUnitTotal> GetAccountExtra(PerExcel excel, SheetType s
? assessList?.Where(w => w.IsTotal == 1) ? assessList?.Where(w => w.IsTotal == 1)
: assessList?.Where(w => w.IsTotal != 1); : assessList?.Where(w => w.IsTotal != 1);
return assessList return assessList?.Select(t => new EmpolyeeTotal
?.GroupBy(t => new { t.UnitType, t.AccountingUnit }) {
?.Select(t => new AccountUnitTotal { UnitType = t.Key.UnitType, AccountingUnit = t.Key.AccountingUnit, TotelValue = t.Sum(g => g.CellValue) }); UnitType = t.UnitType,
AccountingUnit = t.AccountingUnit,
JobNumber = t.JobNumber,
EmployeeName = t.EmployeeName,
TotelValue = t.CellValue
});
} }
/// <summary> /// <summary>
...@@ -419,24 +424,16 @@ public IEnumerable<EmpolyeeTotal> GetEmployeeExtra(PerExcel excel) ...@@ -419,24 +424,16 @@ public IEnumerable<EmpolyeeTotal> GetEmployeeExtra(PerExcel excel)
.FirstOrDefault(t => t.SheetType == SheetType.PersonExtra) .FirstOrDefault(t => t.SheetType == SheetType.PersonExtra)
?.PerData ?.PerData
?.Select(t => (PerData)t) ?.Select(t => (PerData)t)
?.Where(w => w.IsTotal != 1); ?.Where(w => w.IsTotal == 1);
return assessList return assessList?.Select(t => new EmpolyeeTotal
?.GroupBy(t => new {
{ UnitType = t.UnitType,
t.UnitType, AccountingUnit = t.AccountingUnit,
t.AccountingUnit, JobNumber = t.JobNumber,
t.JobNumber, EmployeeName = t.EmployeeName,
t.EmployeeName, TotelValue = t.CellValue
}) });
?.Select(t => new EmpolyeeTotal
{
UnitType = t.Key.UnitType,
AccountingUnit = t.Key.AccountingUnit,
JobNumber = t.Key.JobNumber,
EmployeeName = t.Key.EmployeeName,
TotelValue = t.Sum(g => g.CellValue)
});
} }
/// <summary> /// <summary>
......
...@@ -248,9 +248,9 @@ public class ResultComputeService : IAutoInjection ...@@ -248,9 +248,9 @@ public class ResultComputeService : IAutoInjection
Adjust = empolyeeAdjust ?? 1m, Adjust = empolyeeAdjust ?? 1m,
Grant = isBudget ? grant : empolyee.Management, Grant = isBudget ? grant : empolyee.Management,
Attendance = empolyee.Attendance ?? 0, Attendance = empolyee.Attendance ?? 0,
AssessBeforeOtherFee = empolyee.AssessBeforeOtherFee ?? 0, AssessBeforeOtherFee = empolyee?.AssessBeforeOtherFee ?? 0,
AssessLaterOtherFee = empolyee.AssessLaterOtherFee ?? 0, AssessLaterOtherFee = empolyee?.AssessLaterOtherFee ?? 0,
AdjustLaterOtherFee = empolyee.AdjustLaterOtherFee ?? 0, AdjustLaterOtherFee = empolyee?.AdjustLaterOtherFee ?? 0,
}; };
compute.Efficiency = compute.Avg * (empolyee.Efficiency ?? 1); compute.Efficiency = compute.Avg * (empolyee.Efficiency ?? 1);
......
...@@ -455,7 +455,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot ...@@ -455,7 +455,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
{ {
// 奖罚汇总 // 奖罚汇总
var extra = employeeExtra?.Where(w => !string.IsNullOrEmpty(w.AccountingUnit) && !string.IsNullOrEmpty(w.UnitType) && (!string.IsNullOrEmpty(w.EmployeeName) || !string.IsNullOrEmpty(w.JobNumber))) var extra = employeeExtra?.Where(w => !string.IsNullOrEmpty(w.AccountingUnit) && !string.IsNullOrEmpty(w.UnitType) && (!string.IsNullOrEmpty(w.EmployeeName) || !string.IsNullOrEmpty(w.JobNumber)))
.FirstOrDefault(w => w.AccountingUnit == item.AccountingUnit && w.UnitType == item.UnitType && w.JobNumber == item.JobNumber && w.EmployeeName == item.DoctorName) .FirstOrDefault(w => w.AccountingUnit == item.AccountingUnit && w.UnitType == item.AccountType && w.JobNumber == item.JobNumber && w.EmployeeName == item.DoctorName)
?.TotelValue; ?.TotelValue;
var compute = new ComputeResult var compute = new ComputeResult
...@@ -478,9 +478,9 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot ...@@ -478,9 +478,9 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
Adjust = (isBudget ? adjust : item.Adjust) ?? 1m, Adjust = (isBudget ? adjust : item.Adjust) ?? 1m,
//Workload = item.Workload //Workload = item.Workload
AssessBeforeOtherFee = item.AssessBeforeOtherFee ?? 0, AssessBeforeOtherFee = item?.AssessBeforeOtherFee ?? 0,
AssessLaterOtherFee = item.AssessLaterOtherFee ?? 0, AssessLaterOtherFee = item?.AssessLaterOtherFee ?? 0,
AdjustLaterOtherFee = item.AdjustLaterOtherFee ?? 0, AdjustLaterOtherFee = item?.AdjustLaterOtherFee ?? 0,
}; };
decimal? baiscnorm = compute?.FitPeopleValue ?? 0; decimal? baiscnorm = compute?.FitPeopleValue ?? 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