全院 管理绩效开关用法

parent 7cd3c3b3
...@@ -152,11 +152,11 @@ public void ConfigureServices(IServiceCollection services) ...@@ -152,11 +152,11 @@ public void ConfigureServices(IServiceCollection services)
#region hangfire #region hangfire
//services.AddHangfire(config => services.AddHangfire(config =>
//{ {
// config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 }); config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 });
// config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString)); config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString));
//}); });
#endregion hangfire #endregion hangfire
...@@ -242,8 +242,8 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF ...@@ -242,8 +242,8 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
#region hangfire #region hangfire
//app.UseHangfireServer(); app.UseHangfireServer();
//app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } }); app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } });
#endregion hangfire #endregion hangfire
......
...@@ -469,18 +469,16 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM ...@@ -469,18 +469,16 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
var empDic = perforPeremployeeRepository.GetEntities(w => w.AllotId == allotId); var empDic = perforPeremployeeRepository.GetEntities(w => w.AllotId == allotId);
foreach (var item in result) foreach (var item in result)
{ {
var perfor = ((item.GiveFee ?? 0) != 0 ? item.GiveFee : item.PerforSumFee) ?? 0;
item.PerforSumFee = Math.Round(item.PerforSumFee ?? 0, 0, MidpointRounding.AwayFromZero); item.PerforSumFee = Math.Round(item.PerforSumFee ?? 0, 0, MidpointRounding.AwayFromZero);
item.PerforManagementFee = Math.Round(item.PerforManagementFee ?? 0, 0, MidpointRounding.AwayFromZero); item.PerforManagementFee = Math.Round(item.PerforManagementFee ?? 0, 0, MidpointRounding.AwayFromZero);
item.GiveFee = Math.Round(perfor, 0, MidpointRounding.AwayFromZero); var real = Math.Round((item.PerforSumFee ?? 0) + (item.PerforManagementFee ?? 0), 0) * item.Adjust + item.AdjustLaterOtherFee;
item.AdjustLaterOtherFee = Math.Round(item.AdjustLaterOtherFee ?? 0, 0, MidpointRounding.AwayFromZero);
item.OthePerfor = Math.Round(item.OthePerfor ?? 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.NightWorkPerfor = Math.Round(item.NightWorkPerfor ?? 0, 0, MidpointRounding.AwayFromZero);
item.ShouldGiveFee = Math.Round((perfor + item.AdjustLaterOtherFee + item.NightWorkPerfor) ?? 0, 0, MidpointRounding.AwayFromZero); item.ShouldGiveFee = Math.Round((real ?? 0) + (item.OthePerfor ?? 0) + (item.NightWorkPerfor ?? 0), 0, MidpointRounding.AwayFromZero);
//item.ReservedRatio = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.ReservedRatio ?? 0; item.ReservedRatio = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.ReservedRatio ?? 0;
//item.ReservedRatioFee = Math.Round(((item.PerforSumFee ?? 0) + (item.PerforManagementFee ?? 0)) * item.ReservedRatio ?? 0, 0, MidpointRounding.AwayFromZero); item.ReservedRatioFee = Math.Round((real ?? 0) * (item.ReservedRatio ?? 0), 0, MidpointRounding.AwayFromZero);
item.RealGiveFee = Math.Round((perfor + item.AdjustLaterOtherFee + item.NightWorkPerfor) ?? 0, 0, MidpointRounding.AwayFromZero); item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 0, MidpointRounding.AwayFromZero);
} }
} }
...@@ -502,8 +500,8 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i ...@@ -502,8 +500,8 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
var types1 = new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() }; var types1 = new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() };
var types2 = new List<string> { AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() }; var types2 = new List<string> { AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() };
// 业务中层人员信息 //// 业务中层人员信息
var empolyeeList = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId); //var empolyeeList = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId);
// 一次绩效 获取特定人员绩效结果 // 一次绩效 获取特定人员绩效结果
var allot = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && mTypes.Contains(t.AccountType))?.OrderByDescending(t => t.AccountingUnit); var allot = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && mTypes.Contains(t.AccountType))?.OrderByDescending(t => t.AccountingUnit);
//var apramounts = perapramountRepository.GetEntities(t => t.AllotId == allotId); //var apramounts = perapramountRepository.GetEntities(t => t.AllotId == allotId);
...@@ -512,29 +510,25 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i ...@@ -512,29 +510,25 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
{ {
var comp = new ComputeResponse("一次绩效", t.AccountingUnit, t.EmployeeName, t.JobNumber, t.JobTitle); var comp = new ComputeResponse("一次绩效", t.AccountingUnit, t.EmployeeName, t.JobNumber, t.JobTitle);
comp.UnitType = t.AccountType; comp.UnitType = t.AccountType;
comp.Adjust = t.Adjust;
comp.AdjustLaterOtherFee = t.AdjustLaterOtherFee;
if (types1.Contains(t.AccountType))
comp.PerforManagementFee = ((t.Efficiency + t.Scale) * t.Grant + t.OtherManagePerfor) * t.Attendance * t.ScoreAverageRate;
else
comp.PerforManagementFee = t.RealGiveFee;
// 行政中层 行政高层 补充 夜班费 // 行政中层 行政高层 补充 夜班费
if (types2.Contains(t.AccountType)) if (types2.Contains(t.AccountType))
comp.NightWorkPerfor = t.NightWorkPerfor; comp.NightWorkPerfor = t.NightWorkPerfor;
// 获取科主任系数,解决共用科主任重复计算人均问题
var basics = empolyeeList?.FirstOrDefault(w => w.AccountingUnit == t.AccountingUnit && w.DoctorName == t.EmployeeName && w.PersonnelNumber == t.JobNumber)?.Basics; // 科主任/护士长
// 仅显示管理绩效 if (types1.Contains(t.AccountType))
if (isShowManage == 2) {
comp.PerforSumFee = 0; // 等同于考核后管理绩效 AssessLaterManagementFee
else comp.PerforManagementFee = Math.Round(t.ShouldGiveFee * t.ScoreAverageRate * t.Attendance + t.Punishment ?? 0);
comp.PerforSumFee = Math.Round((t.Avg * (basics ?? 1)) + t.ShouldGiveFee + t.AssessBeforeOtherFee ?? 0); // 仅显示管理绩效
if (isShowManage == 2)
comp.Punishment = t.Punishment; comp.PerforSumFee = 0;
comp.ShouldGiveFee = t.ShouldGiveFee; else
comp.PerforSumFee = t.PerforSumFee; comp.PerforSumFee = t.Avg;
comp.GiveFee = t.GiveFee * t.Adjust; }
comp.AdjustLaterOtherFee = t.AdjustLaterOtherFee ?? 0;
comp.OthePerfor = t.OtherPerfor;
comp.RealGiveFee = t.RealGiveFee;
return comp; return comp;
}).ToList(); }).ToList();
} }
......
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