修改医院开关

parent 08772e62
......@@ -55,6 +55,10 @@ public class HospitalRequest
/// 是否显示绩效合计 1 显示绩效合计 2 显示管理绩效
/// </summary>
public Nullable<int> IsShowManage { get; set; }
/// <summary>
/// 是否开启科室CMI占比 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenCMIPercent { get; set; }
}
public class HospitalRequestValidator : AbstractValidator<HospitalRequest>
......
......@@ -178,7 +178,7 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
var employee = employees.FirstOrDefault(e => e.DoctorName == t.EmployeeName && e.AccountingUnit == t.AccountingUnit && pairs[type].Contains(e.UnitType));
var scoreAverageRate = t.ScoreAverageRate ?? employee.ScoreAverageRate ?? 0;
var attendance = t.Attendance ?? employee.Attendance ?? 0;
t.GiveFee = t.ShouldGiveFee * scoreAverageRate * attendance + t.OtherPerfor;
t.GiveFee = t.ShouldGiveFee * scoreAverageRate * attendance + (t.OtherPerfor ?? 0);
t.RealGiveFee = t.GiveFee * (t.Adjust ?? 1m);
t.BaiscNormValue = t.RealGiveFee;
}
......@@ -438,12 +438,14 @@ public List<ComputeResponse> AllCompute(int allotId, int isShowManage)
var empDic = perforPeremployeeRepository.GetEntities(w => w.AllotId == allotId);
foreach (var item in result)
{
var temp = item.PerforSumFee ?? 0 + item.PerforManagementFee ?? 0;
item.ShouldGiveFee = item.PerforSumFee ?? 0 + item.PerforManagementFee ?? 0 + item.OthePerfor ?? 0 + item.NightWorkPerfor ?? 0;
item.PerforSumFee = Math.Round(item.PerforSumFee ?? 0, 0, MidpointRounding.AwayFromZero);
item.PerforManagementFee = Math.Round(item.PerforManagementFee ?? 0, 0, MidpointRounding.AwayFromZero);
item.OthePerfor = Math.Round(item.OthePerfor ?? 0, 0, MidpointRounding.AwayFromZero);
item.NightWorkPerfor = Math.Round(item.NightWorkPerfor ?? 0, 0, MidpointRounding.AwayFromZero);
item.ShouldGiveFee = Math.Round((item.PerforSumFee ?? 0) + (item.PerforManagementFee ?? 0) + (item.OthePerfor ?? 0) + (item.NightWorkPerfor ?? 0), 0, MidpointRounding.AwayFromZero);
item.ReservedRatio = empDic?.FirstOrDefault(w => w.DoctorName == item.EmployeeName && w.PersonnelNumber == item.JobNumber)?.ReservedRatio ?? 0;
item.ReservedRatioFee = temp * item.ReservedRatio;
item.RealGiveFee = item.ShouldGiveFee - (item.ReservedRatioFee ?? 0);
item.ReservedRatioFee = Math.Round(((item.PerforSumFee ?? 0) + (item.PerforManagementFee ?? 0)) * item.ReservedRatio ?? 0, 0, MidpointRounding.AwayFromZero);
item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 0, MidpointRounding.AwayFromZero);
}
}
......@@ -465,17 +467,17 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int isShowManage)
return allot?.Select(t =>
{
var comp = new ComputeResponse("一次绩效", t.AccountingUnit, t.EmployeeName, t.JobNumber, t.JobTitle);
// 仅显示管理绩效
if (isShowManage == 1 && types.Contains(t.AccountType))
{
if (types.Contains(t.AccountType))
comp.PerforManagementFee = (t.ShouldGiveFee ?? 0) + (t.OtherPerfor ?? 0) + (t.Punishment ?? 0);
comp.PerforSumFee = 0;
}
else
{
comp.PerforManagementFee = t.RealGiveFee;
// 仅显示管理绩效
if (isShowManage == 1)
comp.PerforSumFee = 0;
else
comp.PerforSumFee = t.Avg;
}
return comp;
}).ToList();
}
......
......@@ -133,6 +133,7 @@ public HospitalResponse Update(HospitalRequest request)
//hospital.IsOpenDirector = request.IsOpenDirector;
hospital.IsOpenDrugprop = request.IsOpenDrugprop;
hospital.IsShowManage = request.IsShowManage;
hospital.IsOpenCMIPercent = request.IsOpenCMIPercent;
//hospital.IsOpenIncome = request.IsOpenIncome;
if (!_hospitalRepository.Update(hospital))
......
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