特殊科室计算

parent b5ade24f
...@@ -437,7 +437,7 @@ ...@@ -437,7 +437,7 @@
<summary> <summary>
其他医院绩效统计 其他医院绩效统计
</summary> </summary>
<param name="request"></param> <param name="allotId"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.ConfigController.GetDrugtypeList(Performance.DtoModels.DrugpropRequest)"> <member name="M:Performance.Api.Controllers.ConfigController.GetDrugtypeList(Performance.DtoModels.DrugpropRequest)">
......
...@@ -191,7 +191,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -191,7 +191,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
AllotID = allot.ID, AllotID = allot.ID,
AccountingUnit = group.AccountingUnit, AccountingUnit = group.AccountingUnit,
Department = group.AccountingUnit, Department = group.AccountingUnit,
Number = group.Number, // 优先使用4.1中人数
Number = dept?.Number ?? group.Number,
QuantitativeIndicators = item.QuantitativeIndicators, QuantitativeIndicators = item.QuantitativeIndicators,
Quantity = item.Quantity, Quantity = item.Quantity,
QuantitativeIndicatorsValue = item.QuantitativeIndicatorsValue, QuantitativeIndicatorsValue = item.QuantitativeIndicatorsValue,
...@@ -216,7 +217,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -216,7 +217,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
res.PerforTotal = (sumValue ?? 0) + res.AssessBeforeOtherFee; res.PerforTotal = (sumValue ?? 0) + res.AssessBeforeOtherFee;
res.GiveFee = Math.Round(res.PerforTotal * res.ScoringAverage + dept.MedicineExtra + dept.MaterialsExtra + res.Punishment + res.AssessLaterOtherFee ?? 0); res.GiveFee = Math.Round(res.PerforTotal * res.ScoringAverage + dept.MedicineExtra + dept.MaterialsExtra + res.Punishment + res.AssessLaterOtherFee ?? 0);
res.RealGiveFee = Math.Round(res.GiveFee * res.Adjust + res.AdjustLaterOtherFee ?? 0); res.RealGiveFee = Math.Round(res.GiveFee * res.Adjust + res.AdjustLaterOtherFee ?? 0);
res.Avg = Math.Round((group.Number != 0 ? res.GiveFee / group.Number : null) ?? 0); res.Avg = Math.Round((res.Number != 0 ? res.PerforTotal / res.Number : null) ?? 0);
res.ResultsTotalFee = Math.Round(sumValue ?? 0); res.ResultsTotalFee = Math.Round(sumValue ?? 0);
resDataList.Add(res); resDataList.Add(res);
...@@ -229,17 +230,15 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -229,17 +230,15 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
foreach (var empolyee in empolyees) foreach (var empolyee in empolyees)
{ {
//var extra = employeeExtra?.Where(w => !string.IsNullOrEmpty(w.AccountingUnit) && !string.IsNullOrEmpty(w.UnitType) var resAccount = resDataList.FirstOrDefault(t => t.AccountingUnit == empolyee.AccountingUnit);
// && (!string.IsNullOrEmpty(w.EmployeeName) || !string.IsNullOrEmpty(w.JobNumber))) if (resAccount == null || empolyees.Count() == 1)
// .FirstOrDefault(w => w.AccountingUnit == empolyee.AccountingUnit && w.UnitType == empolyee.UnitType continue;
// && w.JobNumber == empolyee.JobNumber && w.EmployeeName == empolyee.DoctorName)?.TotelValue;
//var avg = (group.Number == 0 ? 0 : (sumValue / group.Number));
// 优先取 实际人均绩效 // 优先取 实际人均绩效
var avg = (empolyee.FitPeopleValue.HasValue) var avg = (empolyee.FitPeopleValue.HasValue)
? empolyee.FitPeopleValue ? empolyee.FitPeopleValue
: group.Number == 0 ? 0 : sumValue / group.Number; : resAccount.Number == 0 ? 0 : resAccount.PerforTotal / resAccount.Number;
var effAvg = empolyee.PermanentStaff == 0 ? 0 : sumValue / empolyee.PermanentStaff; var effAvg = empolyee.PermanentStaff == 0 ? 0 : resAccount.PerforTotal / empolyee.PermanentStaff;
var empolyeeAdjust = isBudget ? adjust : empolyee.Adjust; var empolyeeAdjust = isBudget ? adjust : empolyee.Adjust;
var compute = new ComputeResult var compute = new ComputeResult
...@@ -256,9 +255,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -256,9 +255,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
Punishment = empolyee.Punishment ?? 0, Punishment = empolyee.Punishment ?? 0,
//OtherPerfor = empolyee.OtherPerfor, //OtherPerfor = empolyee.OtherPerfor,
OtherManagePerfor = empolyee?.OtherManagePerfor ?? 0, OtherManagePerfor = empolyee?.OtherManagePerfor ?? 0,
Number = group.Number, Number = resAccount.Number,
PerforTotal = sumValue, PerforTotal = resAccount.PerforTotal,
//Avg = group.Number == 0 ? 0 : (sumValue / group.Number),
Adjust = empolyeeAdjust ?? 1m, Adjust = empolyeeAdjust ?? 1m,
Grant = isBudget ? grant : empolyee.Management, Grant = isBudget ? grant : empolyee.Management,
Attendance = empolyee.Attendance ?? 0, Attendance = empolyee.Attendance ?? 0,
...@@ -266,7 +264,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -266,7 +264,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
AssessLaterOtherFee = empolyee?.AssessLaterOtherFee ?? 0, AssessLaterOtherFee = empolyee?.AssessLaterOtherFee ?? 0,
AdjustLaterOtherFee = empolyee?.AdjustLaterOtherFee ?? 0, AdjustLaterOtherFee = empolyee?.AdjustLaterOtherFee ?? 0,
Efficiency = effAvg * (empolyee.Efficiency ?? 0), Efficiency = effAvg * (empolyee.Efficiency ?? 0),
Scale = sumValue * (empolyee.Scale ?? 0), Scale = resAccount.PerforTotal * (empolyee.Scale ?? 0),
}; };
compute.Avg = avg * (empolyee.Basics ?? 0) * compute.Attendance; compute.Avg = avg * (empolyee.Basics ?? 0) * compute.Attendance;
......
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