Commit fb1d4b62 by 799284587@qq.com

Merge branch 'feature/jwt' into develop

# Conflicts:
#	performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
#	performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
#	performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
#	performance/Performance.EntityModels/Entity/mod_module.cs
#	performance/Performance.EntityModels/Entity/res_account.cs
#	performance/Performance.Extract.Api/Controllers/ModExtractController.cs
#	performance/Performance.Services/AllotCompute/ProcessComputService.cs
#	performance/Performance.Services/ComputeService.cs
#	performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccountingt.cs
parents 5acae741 123b65a9
...@@ -69,13 +69,13 @@ public ApiResponse<List<res_specialunit>> GetSpecial([FromBody]ComputerRequest r ...@@ -69,13 +69,13 @@ public ApiResponse<List<res_specialunit>> GetSpecial([FromBody]ComputerRequest r
/// <returns></returns> /// <returns></returns>
[Route("getdoctordata")] [Route("getdoctordata")]
[HttpPost] [HttpPost]
public ApiResponse<List<DoctorResponse>> GetDoctor([FromBody]ComputerRequest request) public ApiResponse<List<DeptResponse>> GetDoctor([FromBody]ComputerRequest request)
{ {
var allot = _allotService.GetAllot(request.AllotId); var allot = _allotService.GetAllot(request.AllotId);
if (null == allot) if (null == allot)
throw new PerformanceException("当前绩效记录不存在"); throw new PerformanceException("当前绩效记录不存在");
var list = _computeService.GetDoctorPerformance(request.AllotId); var list = _computeService.GetDoctorPerformance(request.AllotId);
return new ApiResponse<List<DoctorResponse>>(ResponseType.OK, "ok", list); return new ApiResponse<List<DeptResponse>>(ResponseType.OK, "ok", list);
} }
/// <summary> /// <summary>
...@@ -85,13 +85,13 @@ public ApiResponse<List<DoctorResponse>> GetDoctor([FromBody]ComputerRequest req ...@@ -85,13 +85,13 @@ public ApiResponse<List<DoctorResponse>> GetDoctor([FromBody]ComputerRequest req
/// <returns></returns> /// <returns></returns>
[Route("getnursedata")] [Route("getnursedata")]
[HttpPost] [HttpPost]
public ApiResponse<List<NurseResponse>> GetNurse([FromBody]ComputerRequest request) public ApiResponse<List<DeptResponse>> GetNurse([FromBody]ComputerRequest request)
{ {
var allot = _allotService.GetAllot(request.AllotId); var allot = _allotService.GetAllot(request.AllotId);
if (null == allot) if (null == allot)
throw new PerformanceException("当前绩效记录不存在"); throw new PerformanceException("当前绩效记录不存在");
var list = _computeService.GetNursePerformance(request.AllotId); var list = _computeService.GetNursePerformance(request.AllotId);
return new ApiResponse<List<NurseResponse>>(ResponseType.OK, "ok", list); return new ApiResponse<List<DeptResponse>>(ResponseType.OK, "ok", list);
} }
/// <summary> /// <summary>
......
...@@ -155,8 +155,8 @@ public AutoMapperConfigs() ...@@ -155,8 +155,8 @@ public AutoMapperConfigs()
CreateMap<im_employee, ComputeEmployee>(); CreateMap<im_employee, ComputeEmployee>();
CreateMap<ComputeResult, res_compute>(); CreateMap<ComputeResult, res_compute>();
CreateMap<res_account, DoctorResponse>(); CreateMap<res_account, DeptResponse>();
CreateMap<res_account, NurseResponse>(); //CreateMap<res_account, NurseResponse>();
//二次绩效 //二次绩效
......
...@@ -125,6 +125,20 @@ public enum PerforType ...@@ -125,6 +125,20 @@ public enum PerforType
医生护士平均, 医生护士平均,
} }
/// <summary>
/// 保底绩效
/// </summary>
public enum MinimumType
{
[Description("保底绩效临床医生人均绩效")]
保底临床医生 = 1,
[Description("保底绩效医技医生人均绩效")]
保底医技医生 = 2,
[Description("保底绩效护士人均绩效")]
保底护士 = 3,
}
///// <summary> ///// <summary>
///// 当前枚举为效率绩效、规模绩效中系数中文名称 ///// 当前枚举为效率绩效、规模绩效中系数中文名称
///// 对应表cof_director中JobTitle 全文字匹配 ///// 对应表cof_director中JobTitle 全文字匹配
......
...@@ -92,10 +92,24 @@ public class PerDataAccountBaisc : IPerData ...@@ -92,10 +92,24 @@ public class PerDataAccountBaisc : IPerData
/// 发放系数 /// 发放系数
/// </summary> /// </summary>
public decimal Grant { get; set; } public decimal Grant { get; set; }
/// <summary>
/// 保底绩效参考标准
/// </summary>
public string MinimumReference { get; set; }
/// <summary>
/// 保底绩效系数
/// </summary>
public Nullable<decimal> MinimumFactor { get; set; }
#endregion #endregion
#region 由计算得出 #region 由计算得出
/// <summary>
/// 保底绩效金额
/// </summary>
public Nullable<decimal> MinimumFee { get; set; }
/// <summary> /// <summary>
/// 科室业绩 /// 科室业绩
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
namespace Performance.DtoModels namespace Performance.DtoModels
{ {
public class DoctorResponse public class DeptResponse
{ {
/// <summary> /// <summary>
/// ///
...@@ -54,6 +54,21 @@ public class DoctorResponse ...@@ -54,6 +54,21 @@ public class DoctorResponse
public Nullable<decimal> SlopeFactor { get; set; } public Nullable<decimal> SlopeFactor { get; set; }
/// <summary> /// <summary>
/// 保底绩效参考标准
/// </summary>
public string MinimumReference { get; set; }
/// <summary>
/// 保底绩效系数
/// </summary>
public Nullable<decimal> MinimumFactor { get; set; }
/// <summary>
/// 保底绩效金额
/// </summary>
public Nullable<decimal> MinimumFee { get; set; }
/// <summary>
/// 其他绩效1 /// 其他绩效1
/// </summary> /// </summary>
public Nullable<decimal> OtherPerfor1 { get; set; } public Nullable<decimal> OtherPerfor1 { get; set; }
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class NurseResponse
{
/// <summary>
///
/// </summary>
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> SheetID { get; set; }
public int UnitType { get; set; }
/// <summary>
/// 分组名称(医生、护士)
/// </summary>
public string UnitName { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 护士人数
/// </summary>
public Nullable<decimal> Number { get; set; }
/// <summary>
/// 护理基础系数
/// </summary>
public Nullable<decimal> BasicFactor { get; set; }
/// <summary>
/// 倾斜系数
/// </summary>
public Nullable<decimal> SlopeFactor { get; set; }
/// <summary>
/// 其他绩效1
/// </summary>
public Nullable<decimal> OtherPerfor1 { get; set; }
/// <summary>
/// 其他绩效2
/// </summary>
public Nullable<decimal> OtherPerfor2 { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public Nullable<decimal> Extra { get; set; }
/// <summary>
/// 考核对分率
/// </summary>
public Nullable<decimal> ScoringAverage { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public Nullable<decimal> AdjustFactor { get; set; }
/// <summary>
/// 科室业绩
/// </summary>
public Nullable<decimal> Income { get; set; }
/// <summary>
/// 业绩绩效
/// </summary>
public Nullable<decimal> PerforFee { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public Nullable<decimal> WorkloadFee { get; set; }
/// <summary>
/// 绩效合计
/// </summary>
public Nullable<decimal> PerforTotal { get; set; }
/// <summary>
/// 人均绩效
/// </summary>
public Nullable<decimal> Avg { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public Nullable<decimal> RealGiveFee { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}
...@@ -112,6 +112,16 @@ public class im_accountbasic ...@@ -112,6 +112,16 @@ public class im_accountbasic
public Nullable<decimal> DoctorAdjustFactor { get; set; } public Nullable<decimal> DoctorAdjustFactor { get; set; }
/// <summary> /// <summary>
/// 保底绩效参考标准
/// </summary>
public string MinimumReference { get; set; }
/// <summary>
/// 保底绩效系数
/// </summary>
public Nullable<decimal> MinimumFactor { get; set; }
/// <summary>
/// 护士长人数 /// 护士长人数
/// </summary> /// </summary>
public Nullable<decimal> NurseHeadNumber { get; set; } public Nullable<decimal> NurseHeadNumber { get; set; }
......
...@@ -62,7 +62,7 @@ public class per_allot ...@@ -62,7 +62,7 @@ public class per_allot
public Nullable<DateTime> UploadDate { get; set; } public Nullable<DateTime> UploadDate { get; set; }
/// <summary> /// <summary>
/// 0 数据未上传 1 数据已上传 2 正在校验数据 3 数据验证通过 4 数据错误 5 正在生成绩效 6 绩效结果解析成功 7 绩效解析失败 8 归档 /// 0 数据未上传 1 数据已上传 2 正在校验数据 3 数据验证通过 4 数据错误 5 正在生成绩效 6 绩效结果解析成功 7 绩效解析失败 8 归档 9 等待生成
/// </summary> /// </summary>
public int States { get; set; } public int States { get; set; }
......
//-----------------------------------------------------------------------
// <copyright file=" per_item.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("per_item")]
public class per_item
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> ModuleId { get; set; }
/// <summary>
/// 绩效考核项
/// </summary>
public string ItemName { get; set; }
/// <summary>
/// 默认系数或医生系数
/// </summary>
public Nullable<decimal> FactorValue1 { get; set; }
/// <summary>
/// 护理系数
/// </summary>
public string FactorValue2 { get; set; }
/// <summary>
/// 抽取绩效值SQL
/// </summary>
public Nullable<int> ExtractId { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_module.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("per_module")]
public class per_module
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> HospitalId { get; set; }
/// <summary>
///
/// </summary>
public string ModuleName { get; set; }
/// <summary>
///
/// </summary>
public string Description { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" per_special.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("per_special")]
public class per_special
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> HospitalId { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 量化指标
/// </summary>
public string Target { get; set; }
/// <summary>
/// 量化指标绩效分值
/// </summary>
public Nullable<decimal> TargetFactor { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public Nullable<decimal> AdjustFactor { get; set; }
}
}
...@@ -67,6 +67,21 @@ public class res_account ...@@ -67,6 +67,21 @@ public class res_account
public Nullable<decimal> SlopeFactor { get; set; } public Nullable<decimal> SlopeFactor { get; set; }
/// <summary> /// <summary>
/// 保底绩效参考标准
/// </summary>
public string MinimumReference { get; set; }
/// <summary>
/// 保底绩效系数
/// </summary>
public Nullable<decimal> MinimumFactor { get; set; }
/// <summary>
/// 保底绩效金额
/// </summary>
public Nullable<decimal> MinimumFee { get; set; }
/// <summary>
/// 其他绩效1 /// 其他绩效1
/// </summary> /// </summary>
public Nullable<decimal> OtherPerfor1 { get; set; } public Nullable<decimal> OtherPerfor1 { get; set; }
...@@ -120,7 +135,6 @@ public class res_account ...@@ -120,7 +135,6 @@ public class res_account
/// 实发绩效 /// 实发绩效
/// </summary> /// </summary>
public Nullable<decimal> RealGiveFee { get; set; } public Nullable<decimal> RealGiveFee { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>
......
...@@ -20,6 +20,33 @@ public ModExtractController(ModExtractService modExtractService) ...@@ -20,6 +20,33 @@ public ModExtractController(ModExtractService modExtractService)
} }
/// <summary> /// <summary>
/// 绩效数据抽取模板
/// </summary>
/// <returns></returns>
[Route("scheme")]
[HttpPost]
public ApiResponse Extract([CustomizeValidator(RuleSet = "Query"), FromBody]ModModuleRequest request)
{
if (request.HospitalId == null || request.HospitalId.Value == 0)
return new ApiResponse(ResponseType.ParameterError, "HospitalId 不存在,请重新选择!");
var list = modExtractService.ExtractScheme(request.HospitalId.Value);
return new ApiResponse(ResponseType.OK, list);
}
/// <summary>
/// 费用类型
/// </summary>
/// <returns></returns>
[Route("type")]
[HttpPost]
public ApiResponse FeeType()
{
var list = modExtractService.FeeType();
return new ApiResponse(ResponseType.OK, list);
}
/// <summary>
/// 绩效考核项费用来源 /// 绩效考核项费用来源
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
......
...@@ -23,7 +23,7 @@ public class ProcessComputService : IAutoInjection ...@@ -23,7 +23,7 @@ public class ProcessComputService : IAutoInjection
private PerforImheaderRepository perforImHeaderRepository; private PerforImheaderRepository perforImHeaderRepository;
private PerforImemployeeRepository perforImEmployeeRepository; private PerforImemployeeRepository perforImEmployeeRepository;
private PerforResaccountRepository perforResaccountRepository; private PerforResaccountRepository perforResaccountRepository;
//private PerforResaccountnurseRepository perforResAccountnurseRepository; private PerforResbaiscnormRepository perforResbaiscnormRepository;
private PerforCofdrugtypeRepository perforCofdrugtypeRepository; private PerforCofdrugtypeRepository perforCofdrugtypeRepository;
public ProcessComputService(PerforCofincomeRepository perforCofincomeRepository, public ProcessComputService(PerforCofincomeRepository perforCofincomeRepository,
PerforCofdrugpropRepository perforCofdrugpropRepository, PerforCofdrugpropRepository perforCofdrugpropRepository,
...@@ -32,7 +32,7 @@ public class ProcessComputService : IAutoInjection ...@@ -32,7 +32,7 @@ public class ProcessComputService : IAutoInjection
PerforImheaderRepository perforImHeaderRepository, PerforImheaderRepository perforImHeaderRepository,
PerforImemployeeRepository perforImEmployeeRepository, PerforImemployeeRepository perforImEmployeeRepository,
PerforResaccountRepository perforResaccountRepository, PerforResaccountRepository perforResaccountRepository,
//PerforResaccountnurseRepository perforResAccountnurseRepository, PerforResbaiscnormRepository perforResbaiscnormRepository,
PerforCofdrugtypeRepository perforCofdrugtypeRepository) PerforCofdrugtypeRepository perforCofdrugtypeRepository)
{ {
this.perforCofincomeRepository = perforCofincomeRepository; this.perforCofincomeRepository = perforCofincomeRepository;
...@@ -42,7 +42,7 @@ public class ProcessComputService : IAutoInjection ...@@ -42,7 +42,7 @@ public class ProcessComputService : IAutoInjection
this.perforImHeaderRepository = perforImHeaderRepository; this.perforImHeaderRepository = perforImHeaderRepository;
this.perforImEmployeeRepository = perforImEmployeeRepository; this.perforImEmployeeRepository = perforImEmployeeRepository;
this.perforResaccountRepository = perforResaccountRepository; this.perforResaccountRepository = perforResaccountRepository;
//this.perforResAccountnurseRepository = perforResAccountnurseRepository; this.perforResbaiscnormRepository = perforResbaiscnormRepository;
this.perforCofdrugtypeRepository = perforCofdrugtypeRepository; this.perforCofdrugtypeRepository = perforCofdrugtypeRepository;
} }
...@@ -224,7 +224,9 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid) ...@@ -224,7 +224,9 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
var deptAccounting = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic); var deptAccounting = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic);
var dataList = deptAccounting.PerData.Select(t => (PerDataAccountBaisc)t); var dataList = deptAccounting.PerData.Select(t => (PerDataAccountBaisc)t);
var sheet = Compute(dataList, twiceEconomicResult.PerData, twiceWorkloadResult1.PerData, twiceWorkloadResult2.PerData); var baiscnormList = ComputeMinimum(dataList, twiceEconomicResult.PerData, twiceWorkloadResult1.PerData, twiceWorkloadResult2.PerData, allotid);
var sheet = Compute(dataList, twiceEconomicResult.PerData, twiceWorkloadResult1.PerData, twiceWorkloadResult2.PerData, baiscnormList);
perSheet.AddRange(sheet); perSheet.AddRange(sheet);
return perSheet; return perSheet;
...@@ -236,7 +238,8 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid) ...@@ -236,7 +238,8 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
/// <param name="economicData"></param> /// <param name="economicData"></param>
/// <param name="workloadData"></param> /// <param name="workloadData"></param>
/// <returns></returns> /// <returns></returns>
private List<PerSheet> Compute(IEnumerable<PerDataAccountBaisc> dataList, List<PerData> economicData, List<PerData> doctorWorkloadData, List<PerData> nurseWorkloadData) private List<PerSheet> Compute(IEnumerable<PerDataAccountBaisc> dataList, List<PerData> economicData,
List<PerData> doctorWorkloadData, List<PerData> nurseWorkloadData, List<res_baiscnorm> baiscnormList)
{ {
var pairs = new[] var pairs = new[]
{ {
...@@ -257,13 +260,17 @@ private List<PerSheet> Compute(IEnumerable<PerDataAccountBaisc> dataList, List<P ...@@ -257,13 +260,17 @@ private List<PerSheet> Compute(IEnumerable<PerDataAccountBaisc> dataList, List<P
var econDoctor = economicData.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department); var econDoctor = economicData.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
var workDoctor = info.Data.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department); var workDoctor = info.Data.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
//保底绩效
var minimum = baiscnormList.FirstOrDefault(t => t.PositionName == dept.MinimumReference);
if (!string.IsNullOrEmpty(dept.MinimumReference) && minimum != null)
dept.MinimumFee = minimum.AvgValue * (dept.MinimumFactor ?? 0) * (dept.ManagerNumber + dept.Number);
dept.ScoringAverage = dept.ScoringAverage == 0m ? 1 : dept.ScoringAverage; dept.ScoringAverage = dept.ScoringAverage == 0m ? 1 : dept.ScoringAverage;
dept.AdjustFactor = dept.AdjustFactor == 0m ? 1 : dept.AdjustFactor; dept.AdjustFactor = dept.AdjustFactor == 0m ? 1 : dept.AdjustFactor;
dept.Income = econDoctor?.CellValue ?? 0; dept.Income = econDoctor?.CellValue ?? 0;
dept.WorkloadFee = workDoctor?.CellValue ?? 0; dept.WorkloadFee = workDoctor?.CellValue ?? 0;
dept.PerforFee = dept.Income * (dept.BasicFactor + dept.SlopeFactor); dept.PerforFee = dept.Income * (dept.BasicFactor + dept.SlopeFactor);
dept.PerforTotal = dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1; dept.PerforTotal = dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1 + (dept.MinimumFee ?? 0);
dept.RealGiveFee = (dept.PerforTotal * dept.ScoringAverage + dept.Extra + dept.OtherPerfor2) * dept.AdjustFactor; dept.RealGiveFee = (dept.PerforTotal * dept.ScoringAverage + dept.Extra + dept.OtherPerfor2) * dept.AdjustFactor;
dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number); dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
} }
...@@ -300,6 +307,54 @@ private List<PerSheet> Compute(IEnumerable<PerDataAccountBaisc> dataList, List<P ...@@ -300,6 +307,54 @@ private List<PerSheet> Compute(IEnumerable<PerDataAccountBaisc> dataList, List<P
return result; return result;
} }
/// <summary>
/// 计算保底绩效参考标准
/// </summary>
/// <param name="baiscnormList"></param>
/// <param name="allotId"></param>
public List<res_baiscnorm> ComputeMinimum(IEnumerable<PerDataAccountBaisc> accountList, List<PerData> economicData, List<PerData> doctorWorkloadData, List<PerData> nurseWorkloadData, int allotId)
{
var basicRuleList = new[]
{
new { Data = doctorWorkloadData, MinimumType = MinimumType.保底临床医生, UnitType = UnitType.医生组 },
new { Data = doctorWorkloadData, MinimumType = MinimumType.保底医技医生, UnitType = UnitType.医技组 },
new { Data = nurseWorkloadData, MinimumType = MinimumType.保底护士, UnitType = UnitType.护理组 },
};
List<res_baiscnorm> baiscnormList = new List<res_baiscnorm>();
foreach (var rule in basicRuleList)
{
var dataList = accountList.Where(t => t.UnitType == (int)rule.UnitType);
var count = dataList.Sum(t => t.ManagerNumber + t.Number);
decimal totalValue = 0m;
foreach (var dept in dataList)
{
var econDoctor = economicData.FirstOrDefault(t => t.UnitType == rule.UnitType.ToString() && t.AccountingUnit == dept.Department);
var workDoctor = rule.Data.FirstOrDefault(t => t.UnitType == rule.UnitType.ToString() && t.AccountingUnit == dept.Department);
var income = econDoctor?.CellValue ?? 0;
var workloadFee = workDoctor?.CellValue ?? 0;
var perforFee = income * (dept.BasicFactor + dept.SlopeFactor);
var perforTotal = perforFee + workloadFee;
totalValue += perforTotal;
}
var baiscnorm = new res_baiscnorm
{
AllotID = allotId,
PositionName = EnumHelper.GetDescription(rule.MinimumType),
TotelNumber = count,
TotelValue = totalValue,
AvgValue = count == 0 ? 0 : totalValue / count
};
baiscnormList.Add(baiscnorm);
}
perforResbaiscnormRepository.AddRange(baiscnormList.ToArray());
return baiscnormList;
}
/// <summary> /// <summary>
/// 获取药占比分割比例 /// 获取药占比分割比例
/// </summary> /// </summary>
......
...@@ -89,10 +89,10 @@ public List<res_specialunit> GetSpecial(int allotId) ...@@ -89,10 +89,10 @@ public List<res_specialunit> GetSpecial(int allotId)
/// </summary> /// </summary>
/// <param name="allotId">绩效ID</param> /// <param name="allotId">绩效ID</param>
/// <returns></returns> /// <returns></returns>
public List<DoctorResponse> GetDoctorPerformance(int allotId) public List<DeptResponse> GetDoctorPerformance(int allotId)
{ {
var list = perforResaccountRepository.GetEntities(t => t.UnitType != (int)UnitType.护理组 && t.AllotID == allotId)?.OrderByDescending(t => t.AccountingUnit); var list = perforResaccountRepository.GetEntities(t => t.UnitType != (int)UnitType.护理组 && t.AllotID == allotId)?.OrderByDescending(t => t.AccountingUnit);
List<DoctorResponse> doctor = Mapper.Map<List<DoctorResponse>>(list); List<DeptResponse> doctor = Mapper.Map<List<DeptResponse>>(list);
doctor?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString()); doctor?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return doctor; return doctor;
} }
...@@ -102,10 +102,10 @@ public List<DoctorResponse> GetDoctorPerformance(int allotId) ...@@ -102,10 +102,10 @@ public List<DoctorResponse> GetDoctorPerformance(int allotId)
/// </summary> /// </summary>
/// <param name="allotId">绩效ID</param> /// <param name="allotId">绩效ID</param>
/// <returns></returns> /// <returns></returns>
public List<NurseResponse> GetNursePerformance(int allotId) public List<DeptResponse> GetNursePerformance(int allotId)
{ {
var list = perforResaccountRepository.GetEntities(t => t.UnitType == (int)UnitType.护理组 && t.AllotID == allotId)?.OrderByDescending(t => t.AccountingUnit); var list = perforResaccountRepository.GetEntities(t => t.UnitType == (int)UnitType.护理组 && t.AllotID == allotId)?.OrderByDescending(t => t.AccountingUnit);
List<NurseResponse> nurse = Mapper.Map<List<NurseResponse>>(list); List<DeptResponse> nurse = Mapper.Map<List<DeptResponse>>(list);
nurse?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString()); nurse?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return nurse; return nurse;
} }
......
...@@ -42,6 +42,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -42,6 +42,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
unifyUnit.Scale = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数").PointCell)?.ToString()); unifyUnit.Scale = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数").PointCell)?.ToString());
unifyUnit.Effic = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数").PointCell)?.ToString()); unifyUnit.Effic = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数").PointCell)?.ToString());
unifyUnit.Grant = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数").PointCell)?.ToString()); unifyUnit.Grant = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数").PointCell)?.ToString());
unifyUnit.MinimumReference = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效参考标准").PointCell)?.ToString();
unifyUnit.MinimumFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效系数").PointCell)?.ToString());
unifyUnit.OtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1").PointCell)?.ToString()); unifyUnit.OtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1").PointCell)?.ToString());
unifyUnit.OtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2").PointCell)?.ToString()); unifyUnit.OtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2").PointCell)?.ToString());
unifyUnit.Extra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.ToString()); unifyUnit.Extra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.ToString());
......
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