Commit 0515adfa by 李承祥

绩效生成

parent 67adec6c
......@@ -21,7 +21,7 @@ public class BaiscNormService : IAutoInjection
public decimal? GetBaiscNorm(List<res_baiscnorm> baiscnorms, PerformanceType type)
{
decimal? result = null;
if (type == PerformanceType.ReferenceDirector)
if (type == PerformanceType.ReferenceDirector || type == PerformanceType.Null)
{
result = baiscnorms.FirstOrDefault(t => t.PositionName == "临床科主任")?.AvgValue;
}
......@@ -36,18 +36,18 @@ public class BaiscNormService : IAutoInjection
{
result = baiscnorms.FirstOrDefault(t => t.PositionName == "临床科护长")?.AvgValue;
}
else if (type == PerformanceType.ReferenceNurse)
{
result = baiscnorms.FirstOrDefault(t => t.PositionName == "临床护士")?.AvgValue;
}
//else if (type == PerformanceType.ReferenceNurse)
//{
// result = baiscnorms.FirstOrDefault(t => t.PositionName == "临床护士")?.AvgValue;
//}
else if (type == PerformanceType.ReferenceDoctor)
{
result = baiscnorms.FirstOrDefault(t => t.PositionName == "临床医生")?.AvgValue;
}
else if (type == PerformanceType.LogisticsWorker)
{
result = baiscnorms.FirstOrDefault(t => t.PositionName == "行政工勤")?.AvgValue;
}
//else if (type == PerformanceType.LogisticsWorker)
//{
// result = baiscnorms.FirstOrDefault(t => t.PositionName == "行政工勤")?.AvgValue;
//}
if (result.HasValue)
result = Math.Round(result.Value, 4);
return result;
......
......@@ -110,7 +110,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
{
var radio = perforImEmployeeRepository.GetEntities(p => p.FitPeople == EnumHelper.GetDescription((PerformanceType)type.Value) && p.AllotID == allot.ID)
?.FirstOrDefault().FitPeopleRatio ?? 1;
t.Quantity = Math.Round(baiscNormService.GetBaiscNorm(baiscnormList, (PerformanceType)type.Value).Value * radio, 4); //添加参数计算
var basic = baiscNormService.GetBaiscNorm(baiscnormList, (PerformanceType)type.Value);
t.Quantity = basic != null ? basic * radio : null; //添加参数计算
}
var res = new res_specialunit
......@@ -125,10 +126,10 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
ScoringAverage = t.ScoringAverage,
OtherPerfor = t.OtherPerfor,
Punishment = t.Punishment,
Adjust = t.Adjust,
Avg = t.Quantity * t.QuantitativeIndicatorsValue / t.Number,
Adjust = t.Adjust ?? 1,
Avg = t.Number != 0 ? t.Quantity * t.QuantitativeIndicatorsValue / t.Number : null,
GiveFee = t.Quantity * t.QuantitativeIndicatorsValue,
RealGiveFee = (t.Quantity * t.QuantitativeIndicatorsValue + t.OtherPerfor + t.Punishment) * t.Adjust,
RealGiveFee = (t.Quantity * t.QuantitativeIndicatorsValue + t.OtherPerfor + t.Punishment) * (t.Adjust ?? 1),
};
resDataList.Add(res);
}
......
......@@ -32,8 +32,9 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<Comp
Dictionary<PerformanceType, string> keyValues = new Dictionary<PerformanceType, string>
{
{ PerformanceType.ReferenceDirector, "临床科室主任"},
{ PerformanceType.DeputyDirector, "临床科室副主任"},
{ PerformanceType.ReferenceDeputyDirector, "临床科室副主任"},
{ PerformanceType.ReferenceHeadNurse, "临床科室护士长"},
{ PerformanceType.Null, "临床科室主任"},
};
List<ComputeResult> computeList = new List<ComputeResult>();
foreach (var key in keyValues.Keys)
......@@ -57,7 +58,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<Comp
Avg = resAccount?.Avg,
Efficiency = efficiency?.Value * resAccount?.Avg,
Scale = scale?.Value * resAccount?.PerforTotal,
Grant = item.Grant,
Grant = item.Grant ?? 1,
ScoreAverageRate = item.ScoreAverageRate,
Punishment = item.Punishment,
OtherPerfor = item.OtherPerfor,
......@@ -65,18 +66,18 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<Comp
Workload = item.Workload
};
//应发管理绩效
compute.ShouldGiveFee = (efficiency?.Value * resAccount?.Avg + scale?.Value * resAccount?.PerforTotal) * item.Grant;
compute.ShouldGiveFee = (efficiency?.Value * resAccount?.Avg + scale?.Value * resAccount?.PerforTotal) * (item.Grant ?? 1);
//绩效合计
var perforSumFee = (compute.Avg + compute.Efficiency + compute.Scale) * item.Grant;
var perforSumFee = (compute.Avg + compute.Efficiency + compute.Scale) * (item.Grant ?? 1);
if (perforSumFee > (compute.Avg ?? 0) * 2.5m)
compute.PerforSumFee = (compute.Avg ?? 0) * 2.5m;
else
compute.PerforSumFee = perforSumFee;
//应发绩效
compute.GiveFee = compute.Avg * item.Grant + (compute.Efficiency + compute.Scale) * item.Grant * compute.ScoreAverageRate + (item.Punishment ?? 0) + (item.OtherPerfor ?? 0);
compute.GiveFee = compute.Avg * (item.Grant ?? 1) + (compute.Efficiency + compute.Scale) * (item.Grant ?? 1) * compute.ScoreAverageRate + (item.Punishment ?? 0) + (item.OtherPerfor ?? 0);
//实发绩效
var adjust = item.Adjust ?? 1m;
compute.RealGiveFee = compute.GiveFee * adjust - compute.ShouldGiveFee * item.ScoreAverageRate * item.Grant * 0.1m;
compute.RealGiveFee = compute.GiveFee * adjust - compute.ShouldGiveFee * item.ScoreAverageRate * (item.Grant ?? 1) * 0.1m;
computeList.Add(compute);
}
......@@ -98,14 +99,18 @@ public List<res_baiscnorm> ComputeAvg(List<ComputeResult> computes)
//new { type = "医技科室", reference = "科室主任人均绩效", groupname = "医技科主任" },
//new { type = "临床科室", reference = "科室护士长人均绩效", groupname = "临床科护长" },
new { type = "临床科室", reference = "科室副主任人均绩效", groupname = "科副主任" },
new { type = "行政中高层", reference = "临床科室主任人均绩效", groupname = "临床科主任" },
new { type = "行政中高层", reference = "临床科室护士长人均绩效", groupname = "临床科护长" },
new { type = "临床科室", reference = "临床科室主任人均绩效", groupname = "临床科主任" },
new { type = "医技科室", reference = "临床科室主任人均绩效", groupname = "医技科主任" },
new { type = "临床科室", reference = "临床科室副主任人均绩效", groupname = "临床科副主任" },
new { type = "临床科室", reference = "临床科室医生人均绩效", groupname = "临床医生" },
new { type = "临床科室", reference = "临床科室护士长人均绩效", groupname = "临床科护长" },
//new { type = "临床科室", reference = "临床科室护士人均绩效", groupname = "临床护士" },已存在
new { type = "临床科室", reference = "行政工勤人均绩效", groupname = "行政工勤" },
new { type = "临床科室", reference = "", groupname = "临床科主任" },
new { type = "医技科室", reference = "临床科室主任人均绩效", groupname = "医技科主任" },
new { type = "医技科室", reference = "临床科室副主任人均绩效", groupname = "医技副主任" },
new { type = "医技科室", reference = "临床科室护士长人均绩效", groupname = "医技护士长" },
new { type = "医技科室", reference = "", groupname = "医技科主任" },
};
var groupList = from cp in computes
......@@ -150,6 +155,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<res_
foreach (var type in types)
{
var needCompute = empolyeeList.Where(t => t.FitPeople == EnumHelper.GetDescription(type));
if (!needCompute.Any())
continue;
var baiscnorm = baiscNormService.GetBaiscNorm(baiscnormList, type);
foreach (var item in needCompute)
......@@ -160,7 +167,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<res_
AccountingUnit = item.AccountingUnit,
EmployeeName = item.DoctorName,
FitPeople = item.FitPeople,
Grant = item.Grant,
Grant = item.Grant ?? 1,
WorkTime = item.WorkTime,
BaiscNormValue = baiscnorm * (item.FitPeopleRatio ?? 1), //添加参数计算
PostCoefficient = item.PostCoefficient,
......@@ -184,7 +191,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<res_
compute.GiveFee = baiscnorm * compute.PostCoefficient * compute.Attendance * compute.ScoreAverageRate * (compute.WorkYear ?? 1) + (compute.OtherPerfor ?? 0) + (item.Workload ?? 0) + (compute.Punishment ?? 0);
//实发绩效
var adjust = item.Adjust ?? 1m;
compute.RealGiveFee = compute.GiveFee * adjust * item.Grant;
compute.RealGiveFee = compute.GiveFee * adjust * (item.Grant ?? 1);
computeList.Add(compute);
}
}
......
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