科室平均值

parent 7db4a3bf
...@@ -214,6 +214,13 @@ ...@@ -214,6 +214,13 @@
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.ComputeController.GetOther(Performance.DtoModels.ComputerRequest)">
<summary>
其他组科室绩效列表
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ComputeController.DeptDetail(Performance.DtoModels.DeptDetailRequest)"> <member name="M:Performance.Api.Controllers.ComputeController.DeptDetail(Performance.DtoModels.DeptDetailRequest)">
<summary> <summary>
科室绩效详情 科室绩效详情
......
...@@ -47,7 +47,7 @@ public class ResultComputeService : IAutoInjection ...@@ -47,7 +47,7 @@ public class ResultComputeService : IAutoInjection
/// 计算最终数据 /// 计算最终数据
/// </summary> /// </summary>
/// <param name="excel"></param> /// <param name="excel"></param>
public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerSheet> accountSheet, bool isSave = true) public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerSheet> accountSheet, bool isMinimum = false)
{ {
//取出人员信息 //取出人员信息
var empolyeeList = perforImEmployeeRepository.GetEntities(t => t.AllotID == allot.ID); var empolyeeList = perforImEmployeeRepository.GetEntities(t => t.AllotID == allot.ID);
...@@ -56,7 +56,7 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee ...@@ -56,7 +56,7 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
List<ComputeEmployee> computeEmployees = Mapper.Map<List<ComputeEmployee>>(empolyeeList); List<ComputeEmployee> computeEmployees = Mapper.Map<List<ComputeEmployee>>(empolyeeList);
logManageService.WriteMsg("正在生成绩效", "临床科室主任、临床科室副主任、临床科室护士长 最终绩效数据计算", 1, allot.ID, "ReceiveMessage"); logManageService.WriteMsg("正在生成绩效", "临床科室主任、临床科室副主任、临床科室护士长 最终绩效数据计算", 1, allot.ID, "ReceiveMessage");
var computResult = computeDirector.Compute(computeEmployees, accountbasicList, accountSheet, allot); var computResult = computeDirector.Compute(computeEmployees, accountbasicList, accountSheet, allot, isMinimum);
//计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值) //计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值)
List<res_baiscnorm> baiscnormList = new List<res_baiscnorm>(); List<res_baiscnorm> baiscnormList = new List<res_baiscnorm>();
baiscNormService.ComputeAvg(baiscnormList, accountbasicList, computResult); baiscNormService.ComputeAvg(baiscnormList, accountbasicList, computResult);
...@@ -67,7 +67,7 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee ...@@ -67,7 +67,7 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
//计算 行政人员 平均值 //计算 行政人员 平均值
baiscNormService.ComputeOtherAvg(baiscnormList, computResult2, empolyeeList); baiscNormService.ComputeOtherAvg(baiscnormList, computResult2, empolyeeList);
if (isSave) if (!isMinimum)
{ {
var computes = Mapper.Map<List<res_compute>>(computResult); var computes = Mapper.Map<List<res_compute>>(computResult);
computes.AddRange(Mapper.Map<List<res_compute>>(computResult2)); computes.AddRange(Mapper.Map<List<res_compute>>(computResult2));
......
...@@ -262,7 +262,7 @@ public void Generate(per_allot allot, string mail) ...@@ -262,7 +262,7 @@ public void Generate(per_allot allot, string mail)
//计算各人群人均保底绩效 //计算各人群人均保底绩效
logManageService.WriteMsg("计算保底绩效参考标准值", "正在生成保底绩效行政工勤人均绩效", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("计算保底绩效参考标准值", "正在生成保底绩效行政工勤人均绩效", 1, allot.ID, "ReceiveMessage", true);
var minimumBaiscnorm2 = resultComputeService.Compute(allot, excel, sheet, false); var minimumBaiscnorm2 = resultComputeService.Compute(allot, excel, sheet, true);
if (minimumBaiscnorm2 != null && minimumBaiscnorm2.Any(t => t.PositionName == EnumHelper.GetDescription(PerforType.行政工勤))) if (minimumBaiscnorm2 != null && minimumBaiscnorm2.Any(t => t.PositionName == EnumHelper.GetDescription(PerforType.行政工勤)))
{ {
var minimum = minimumBaiscnorm2.First(t => t.PositionName == EnumHelper.GetDescription(PerforType.行政工勤)); var minimum = minimumBaiscnorm2.First(t => t.PositionName == EnumHelper.GetDescription(PerforType.行政工勤));
......
...@@ -137,7 +137,7 @@ public class ComputeDirector : IAutoInjection ...@@ -137,7 +137,7 @@ public class ComputeDirector : IAutoInjection
/// <param name="nurseList"></param> /// <param name="nurseList"></param>
/// <param name="directorList"></param> /// <param name="directorList"></param>
/// <returns></returns> /// <returns></returns>
public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_accountbasic> accountbasicList, List<PerSheet> accountSheet, per_allot allot) public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_accountbasic> accountbasicList, List<PerSheet> accountSheet, per_allot allot, bool isMinimum = false)
{ {
var basicRuleList = new[] var basicRuleList = new[]
{ {
...@@ -173,6 +173,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -173,6 +173,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
var number = resAccount.OrderByDescending(t => t.ManagerNumber).Sum(t => t.ManagerNumber + t.Number); var number = resAccount.OrderByDescending(t => t.ManagerNumber).Sum(t => t.ManagerNumber + t.Number);
var perforTotal = resAccount.Sum(t => t.PerforTotal); var perforTotal = resAccount.Sum(t => t.PerforTotal);
var avg = resAccount.Average(t => t.Avg); var avg = resAccount.Average(t => t.Avg);
if (isMinimum && resAccount.Any(t => t.ManagerNumber > 0 || t.Number > 0))
avg = resAccount.Sum(t => t.RealGiveFee / (t.ManagerNumber + t.Number)) / resAccount.Count();
var basicRule = basicRuleList.FirstOrDefault(t => t.UnitType == (UnitType)accountbasic.UnitType); var basicRule = basicRuleList.FirstOrDefault(t => t.UnitType == (UnitType)accountbasic.UnitType);
if (basicRule == null) continue; if (basicRule == null) continue;
...@@ -218,7 +220,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -218,7 +220,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
//绩效合计 //绩效合计
compute.PerforSumFee = compute.Avg + compute.ShouldGiveFee; compute.PerforSumFee = compute.Avg + compute.ShouldGiveFee;
//应发绩效 //应发绩效
compute.GiveFee = compute.PerforSumFee ; compute.GiveFee = compute.PerforSumFee;
//实发绩效 //实发绩效
compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m); compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m);
computeList.Add(compute); 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