Commit e937d4eb by 799284587@qq.com

新都绩效1.3规模效率绩效配置更改

parent 9fc2d5d3
......@@ -156,8 +156,8 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody]Al
if (null == allot || string.IsNullOrEmpty(allot.Path))
throw new PerformanceException("当前绩效记录不存在或没有上传数据文件");
var user = _claim.At(request);
_allotService.Generate(allot, user.Mail);
//BackgroundJob.Enqueue(() => _allotService.Generate(allot, user.Mail));
//_allotService.Generate(allot, user.Mail);
BackgroundJob.Enqueue(() => _allotService.Generate(allot, user.Mail));
return new ApiResponse(ResponseType.OK);
}
......
......@@ -125,9 +125,9 @@ public class ComputeResult
/// </summary>
public decimal? Adjust { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public decimal? Workload { get; set; }
///// <summary>
///// 工作量绩效
///// </summary>
//public decimal? Workload { get; set; }
}
}
......@@ -24,7 +24,7 @@ public class PerDataAccountBaisc : IPerData
/// <summary>
/// 科主任数量
/// </summary>
public decimal DirectorNumber { get; set; }
public decimal DoctorDirectorNumber { get; set; }
/// <summary>
/// 核算单元医生数量
......@@ -113,5 +113,34 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public int RowNumber { get; set; }
/// <summary>
/// 规模绩效系数
/// </summary>
public Nullable<decimal> DoctorScale { get; set; }
/// <summary>
/// 效率绩效系数
/// </summary>
public Nullable<decimal> DoctorEffic { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> DoctorGrant { get; set; }
/// <summary>
/// 规模绩效系数
/// </summary>
public Nullable<decimal> NurseScale { get; set; }
/// <summary>
/// 效率绩效系数
/// </summary>
public Nullable<decimal> NurseEffic { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> NurseGrant { get; set; }
}
}
......@@ -49,7 +49,7 @@ public class im_accountbasic
/// <summary>
/// 科主任数量
/// </summary>
public Nullable<decimal> DirectorNumber { get; set; }
public Nullable<decimal> DoctorDirectorNumber { get; set; }
/// <summary>
/// 核算单元医生数量
......@@ -67,6 +67,21 @@ public class im_accountbasic
public Nullable<decimal> DoctorSlopeFactor { get; set; }
/// <summary>
/// 规模绩效系数
/// </summary>
public Nullable<decimal> DoctorScale { get; set; }
/// <summary>
/// 效率绩效系数
/// </summary>
public Nullable<decimal> DoctorEffic { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> DoctorGrant { get; set; }
/// <summary>
/// 其他绩效1
/// </summary>
public Nullable<decimal> DoctorOtherPerfor1 { get; set; }
......@@ -112,6 +127,21 @@ public class im_accountbasic
public Nullable<decimal> NurseSlopeFactor { get; set; }
/// <summary>
/// 规模绩效系数
/// </summary>
public Nullable<decimal> NurseScale { get; set; }
/// <summary>
/// 效率绩效系数
/// </summary>
public Nullable<decimal> NurseEffic { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> NurseGrant { get; set; }
/// <summary>
/// 其他绩效1
/// </summary>
public Nullable<decimal> NurseOtherPerfor1 { get; set; }
......
......@@ -6,6 +6,13 @@
</PropertyGroup>
<ItemGroup>
<Compile Remove="Files\**" />
<Content Remove="Files\**" />
<EmbeddedResource Remove="Files\**" />
<None Remove="Files\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
......
......@@ -38,7 +38,7 @@ public class BaiscNormService : IAutoInjection
{
var count = (item.reference == PerforType.护士长)
? accountbasicList.Where(t => accountingUnitList.Contains(t.NurseAccountingUnit)).Sum(t => t.NurseHeadNumber)
: accountbasicList.Where(t => accountingUnitList.Contains(t.DoctorAccountingUnit)).Sum(t => t.DirectorNumber);
: accountbasicList.Where(t => accountingUnitList.Contains(t.DoctorAccountingUnit)).Sum(t => t.DoctorDirectorNumber);
var dataList = computes.Where(t => t.AccountType == item.type.ToString() && t.FitPeople == EnumHelper.GetDescription(item.reference));
var baiscnorm = new res_baiscnorm
......@@ -142,7 +142,7 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
// 医生
var accountingUnitList = empolyeeList.Where(t => t.AccountType == AccountUnitType.临床科室.ToString()).Select(t => t.AccountingUnit).ToList();
var count = accountbasicList.Where(t => accountingUnitList.Contains(t.DoctorAccountingUnit)).Sum(t => t.DoctorNumber + t.DirectorNumber);
var count = accountbasicList.Where(t => accountingUnitList.Contains(t.DoctorAccountingUnit)).Sum(t => t.DoctorNumber + t.DoctorDirectorNumber);
var sheetDocter = list.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorAccount);
var perdataDocter = sheetDocter.PerData.Select(t => (PerDataAccountDoctor)t);
......
......@@ -253,7 +253,7 @@ private PerSheet ComputeDoctor(IEnumerable<PerDataAccountBaisc> dataList, List<P
{
AccountingUnit = dept.DoctorAccountingUnit,
Department = dept.Department,
Number = dept.DoctorNumber + dept.DirectorNumber,
Number = dept.DoctorNumber + dept.DoctorDirectorNumber,
BasicFactor = dept.DoctorBasicFactor,
SlopeFactor = dept.DoctorSlopeFactor,
OtherPerfor1 = dept.DoctorOtherPerfor1,
......
......@@ -68,13 +68,14 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
var needCompute = empolyeeList.Where(t => t.AccountType == basicRule.AccountUnitType.ToString() && t.FitPeople.Trim() == EnumHelper.GetDescription(basicRule.PerforType));
foreach (var item in needCompute)
{
var accountbasic = accountbasicList.FirstOrDefault(t => t.Department == item.Department);
if (accountbasic == null) continue;
//分别取出对应的 计算 人员 平均值等信息
decimal? number, perforTotal, avg;
if (basicRule.PerforType == PerforType.护士长)
{
var nurseHeadNumber = accountbasicList.FirstOrDefault(t => t.Department == item.Department)?.NurseHeadNumber;
if (!nurseHeadNumber.HasValue || nurseHeadNumber.Value == 0) continue;
if (!accountbasic.NurseHeadNumber.HasValue || accountbasic.NurseHeadNumber.Value == 0) continue;
var resAccount = nurseList.FirstOrDefault(t => t.AccountingUnit == item.AccountingUnit);
number = resAccount?.Number;
......@@ -83,21 +84,16 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
}
else
{
var directorNumber = accountbasicList.FirstOrDefault(t => t.Department == item.Department)?.DirectorNumber;
if (!directorNumber.HasValue || directorNumber.Value == 0) continue;
if (!accountbasic.DoctorDirectorNumber.HasValue || accountbasic.DoctorDirectorNumber.Value == 0) continue;
var resAccount = doctorList.FirstOrDefault(t => t.AccountingUnit == item.AccountingUnit);
number = resAccount?.Number;
perforTotal = resAccount?.PerforTotal;
avg = resAccount?.Avg;
}
var efficiency = directorList.FirstOrDefault(t => t.TypeName == "效率绩效" && t.JobTitle == basicRule.DirectorType.ToString() && string.IsNullOrEmpty(t.Department));
var scale = directorList.FirstOrDefault(t => t.TypeName == "规模绩效" && t.JobTitle == basicRule.DirectorType.ToString() && string.IsNullOrEmpty(t.Department));
// 科室单独规模绩效 效率绩效 系数
var efficAccount = directorList.FirstOrDefault(t => t.TypeName == "效率绩效" && t.JobTitle == basicRule.DirectorType.ToString() && t.Department == item.AccountingUnit);
var scaleAccount = directorList.FirstOrDefault(t => t.TypeName == "规模绩效" && t.JobTitle == basicRule.DirectorType.ToString() && t.Department == item.AccountingUnit);
var efficiency = (basicRule.PerforType == PerforType.护士长) ? accountbasic.NurseEffic : accountbasic.DoctorEffic;
var scale = (basicRule.PerforType == PerforType.护士长) ? accountbasic.NurseScale : accountbasic.DoctorScale;
var grant = (basicRule.PerforType == PerforType.护士长) ? accountbasic.NurseGrant : accountbasic.DoctorGrant;
var compute = new ComputeResult
{
......@@ -110,28 +106,22 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
Number = number,
PerforTotal = perforTotal,
Avg = avg,
Efficiency = avg * (efficAccount == null ? efficiency?.Value : efficAccount?.Value),
Scale = perforTotal * (efficAccount == null ? scale?.Value : scaleAccount?.Value),
Grant = item.Grant ?? 1,
Efficiency = avg * (efficiency ?? 1),
Scale = perforTotal * (scale ?? 1),
//Grant = item.Grant ?? 1,
ScoreAverageRate = item.ScoreAverageRate,
Punishment = item.Punishment,
OtherPerfor = item.OtherPerfor,
Adjust = item.Adjust,
Workload = item.Workload
//Workload = item.Workload
};
//应发管理绩效
compute.ShouldGiveFee = (compute.Efficiency + compute.Scale) * (item.Grant ?? 1);
compute.ShouldGiveFee = (compute.Efficiency + compute.Scale) * 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.PerforSumFee = compute.Avg + compute.ShouldGiveFee;
//应发绩效
compute.GiveFee = compute.Avg * (item.Grant ?? 1) + (compute.Efficiency + compute.Scale) * (item.Grant ?? 1) * compute.ScoreAverageRate + (item.Punishment ?? 0) + (item.OtherPerfor ?? 0);
compute.GiveFee = compute.PerforSumFee * compute.ScoreAverageRate + (item.Punishment ?? 0) + (item.OtherPerfor ?? 0);
//实发绩效
//compute.RealGiveFee = compute.GiveFee * (item.Adjust ?? 1m) - compute.ShouldGiveFee * item.ScoreAverageRate * (item.Grant ?? 1) * 0.1m;
compute.RealGiveFee = compute.GiveFee * (item.Adjust ?? 1m);
computeList.Add(compute);
}
......
......@@ -35,10 +35,13 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
unifyUnit.DoctorAccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元(医生组)").PointCell)?.ToString();
unifyUnit.NurseAccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元(护理组)").PointCell)?.ToString();
unifyUnit.Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室名称").PointCell)?.ToString();
unifyUnit.DirectorNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元科主任数量" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorDirectorNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元科主任数量" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元医生数量" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorBasicFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "预算比例" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorScale = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorEffic = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorGrant = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorOtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorOtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
......@@ -49,6 +52,9 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
unifyUnit.NurseNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元护士数量" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseBasicFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "预算比例" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseScale = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseEffic = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseGrant = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseOtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseOtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
......
......@@ -49,6 +49,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
specialUnit.Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.ToString());
specialUnit.Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.ToString());
}
if (!string.IsNullOrEmpty(specialUnit.QuantitativeIndicators) && specialUnit.QuantitativeIndicatorsValue != null)
dataList.Add(specialUnit);
//合并单元格科室名称补全
lastAccount = specialUnit.AccountingUnit;
......
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