特殊科室计算

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