重新计算绩效

parent 716adc59
...@@ -158,6 +158,86 @@ public ApiResponse DeleteClinic([FromBody] im_employee_clinic request) ...@@ -158,6 +158,86 @@ public ApiResponse DeleteClinic([FromBody] im_employee_clinic request)
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
} }
#region 行政后勤
/// <summary>
/// 获取临床人员列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("logistics/getlist")]
[HttpPost]
public ApiResponse GetEmployeeLogisticsList([FromBody] im_employee_clinic request)
{
//if ((request.AllotID ?? 0) == 0)
// return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
var employee = employeeService.GetEmployeeLogisticsList(request.AllotID, claim.GetUserId());
return new ApiResponse(ResponseType.OK, "ok", employee);
}
/// <summary>
/// 新增临床人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("logistics/insert")]
[HttpPost]
public ApiResponse InsertLogistics([FromBody] im_employee_logistics request)
{
if ((request.AllotID ?? 0) == 0)
return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
if (string.IsNullOrEmpty(request.AccountingUnit))
return new ApiResponse(ResponseType.ParameterError, "参数AccountingUnit无效!");
if (string.IsNullOrEmpty(request.DoctorName))
return new ApiResponse(ResponseType.ParameterError, "参数DoctorName无效!");
var employee = employeeService.InsertLogistics(request);
return new ApiResponse(ResponseType.OK, "ok", employee);
}
/// <summary>
/// 修改临床人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("logistics/update")]
[HttpPost]
public ApiResponse UpdateLogistics([FromBody] im_employee_logistics request)
{
if ((request.AllotID ?? 0) == 0)
return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
if (string.IsNullOrEmpty(request.AccountingUnit))
return new ApiResponse(ResponseType.ParameterError, "参数AccountingUnit无效!");
if (string.IsNullOrEmpty(request.DoctorName))
return new ApiResponse(ResponseType.ParameterError, "参数DoctorName无效!");
var employee = employeeService.UpdateLogistics(request);
return new ApiResponse(ResponseType.OK, "ok", employee);
}
/// <summary>
/// 删除临床人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Route("logistics/delete")]
[HttpPost]
public ApiResponse DeleteLogistics([FromBody] im_employee_clinic request)
{
if (request.ID == 0)
return new ApiResponse(ResponseType.ParameterError, "参数ID无效!");
if (!employeeService.DeleteLogistics(request))
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
#endregion
/// <summary> /// <summary>
/// 人事科修改参数后提交 /// 人事科修改参数后提交
/// </summary> /// </summary>
......
...@@ -592,6 +592,34 @@ ...@@ -592,6 +592,34 @@
<param name="request"></param> <param name="request"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetEmployeeLogisticsList(Performance.EntityModels.im_employee_clinic)">
<summary>
获取临床人员列表
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.InsertLogistics(Performance.EntityModels.im_employee_logistics)">
<summary>
新增临床人员
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.UpdateLogistics(Performance.EntityModels.im_employee_logistics)">
<summary>
修改临床人员
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.DeleteLogistics(Performance.EntityModels.im_employee_clinic)">
<summary>
删除临床人员
</summary>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.Audit(System.Int32)"> <member name="M:Performance.Api.Controllers.EmployeeController.Audit(System.Int32)">
<summary> <summary>
人事科修改参数后提交 人事科修改参数后提交
...@@ -1190,7 +1218,7 @@ ...@@ -1190,7 +1218,7 @@
<param name="hospitalId"></param> <param name="hospitalId"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.TemplateController.ReturnLog(System.Int32,System.String,System.String,System.Int32,System.Boolean,System.String)"> <member name="M:Performance.Api.Controllers.TemplateController.ReturnLog(System.Int32,System.String,System.String,System.Int32,System.String)">
<summary> <summary>
返回日志 返回日志
</summary> </summary>
......
...@@ -130,6 +130,9 @@ ...@@ -130,6 +130,9 @@
<member name="P:Performance.EntityModels.PerformanceDbContext.im_employee_clinic"> <member name="P:Performance.EntityModels.PerformanceDbContext.im_employee_clinic">
<summary> </summary> <summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.PerformanceDbContext.im_employee_logistics">
<summary> </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.im_header"> <member name="P:Performance.EntityModels.PerformanceDbContext.im_header">
<summary> </summary> <summary> </summary>
</member> </member>
...@@ -1846,11 +1849,6 @@ ...@@ -1846,11 +1849,6 @@
核算单元(护理组) 核算单元(护理组)
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.im_accountbasic.Department">
<summary>
科室
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.IncludeAvgCalculate"> <member name="P:Performance.EntityModels.im_accountbasic.IncludeAvgCalculate">
<summary> <summary>
是否带入平均计算 是 否 是否带入平均计算 是 否
...@@ -1876,11 +1874,6 @@ ...@@ -1876,11 +1874,6 @@
医生基础系数 医生基础系数
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.im_accountbasic.DoctorSlopeFactor">
<summary>
倾斜系数
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.DoctorScale"> <member name="P:Performance.EntityModels.im_accountbasic.DoctorScale">
<summary> <summary>
规模绩效系数 规模绩效系数
...@@ -1916,11 +1909,6 @@ ...@@ -1916,11 +1909,6 @@
材料占比奖罚 材料占比奖罚
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.im_accountbasic.DoctorExtra">
<summary>
医院奖罚
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.DoctorScoringAverage"> <member name="P:Performance.EntityModels.im_accountbasic.DoctorScoringAverage">
<summary> <summary>
考核对分率 考核对分率
...@@ -2306,6 +2294,11 @@ ...@@ -2306,6 +2294,11 @@
岗位系数 岗位系数
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.im_employee_clinic.PermanentStaff">
<summary>
效率绩效人数
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_clinic.Efficiency"> <member name="P:Performance.EntityModels.im_employee_clinic.Efficiency">
<summary> <summary>
效率绩效系数 效率绩效系数
...@@ -2371,6 +2364,106 @@ ...@@ -2371,6 +2364,106 @@
</summary> </summary>
</member> </member>
<member name="T:Performance.EntityModels.im_employee_logistics">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.ID">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.AllotID">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.SheetID">
<summary>
sheet页id
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.RowNumber">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.AccountType">
<summary>
科室类别(例如 医技科室 临床科室 其他科室)
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.AccountingUnit">
<summary>
核算单元
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.Department">
<summary>
科室名称
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.FitPeople">
<summary>
绩效基数核算参考对象
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.FitPeopleValue">
<summary>
绩效基础核算参考值
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.FitPeopleRatio">
<summary>
绩效基数核算参考对象取值比例(如临床科室护士*95%)
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.PersonnelNumber">
<summary>
人员工号
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.DoctorName">
<summary>
医生姓名
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.JobTitle">
<summary>
职称
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.PostCoefficient">
<summary>
岗位系数
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.ScoreAverageRate">
<summary>
考核得分率
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.Attendance">
<summary>
出勤率
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.OtherPerfor">
<summary>
其他绩效
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.UpdateDate">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.UpdateUser">
<summary>
</summary>
</member>
<member name="T:Performance.EntityModels.im_header"> <member name="T:Performance.EntityModels.im_header">
<summary> <summary>
...@@ -3816,11 +3909,6 @@ ...@@ -3816,11 +3909,6 @@
是否带入平均计算 是 否 是否带入平均计算 是 否
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.res_account.PermanentStaff">
<summary>
定科人数
</summary>
</member>
<member name="P:Performance.EntityModels.res_account.ManagerNumber"> <member name="P:Performance.EntityModels.res_account.ManagerNumber">
<summary> <summary>
科主任/护士长数量 科主任/护士长数量
......
...@@ -110,37 +110,38 @@ public AutoMapperConfigs() ...@@ -110,37 +110,38 @@ public AutoMapperConfigs()
CreateMap<PerDataAccountBaisc, im_accountbasic>() CreateMap<PerDataAccountBaisc, im_accountbasic>()
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType).Value)) .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => EnumHelper.GetItems<UnitType>().First(t => t.Name == src.UnitType).Value))
.ForMember(dest => dest.DoctorAccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit)) .ForMember(dest => dest.DoctorAccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit))
.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department)) //.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
.ForMember(dest => dest.DoctorDirectorNumber, opt => opt.MapFrom(src => src.ManagerNumber)) .ForMember(dest => dest.DoctorDirectorNumber, opt => opt.MapFrom(src => src.ManagerNumber))
.ForMember(dest => dest.DoctorNumber, opt => opt.MapFrom(src => src.Number)) .ForMember(dest => dest.DoctorNumber, opt => opt.MapFrom(src => src.Number))
.ForMember(dest => dest.DoctorBasicFactor, opt => opt.MapFrom(src => src.BasicFactor)) .ForMember(dest => dest.DoctorBasicFactor, opt => opt.MapFrom(src => src.BasicFactor))
.ForMember(dest => dest.DoctorSlopeFactor, opt => opt.MapFrom(src => src.SlopeFactor)) //.ForMember(dest => dest.DoctorSlopeFactor, opt => opt.MapFrom(src => src.SlopeFactor))
.ForMember(dest => dest.DoctorOtherPerfor1, opt => opt.MapFrom(src => src.OtherPerfor1)) .ForMember(dest => dest.DoctorOtherPerfor1, opt => opt.MapFrom(src => src.OtherPerfor1))
.ForMember(dest => dest.DoctorOtherPerfor2, opt => opt.MapFrom(src => src.OtherPerfor2)) .ForMember(dest => dest.DoctorOtherPerfor2, opt => opt.MapFrom(src => src.OtherPerfor2))
.ForMember(dest => dest.DoctorExtra, opt => opt.MapFrom(src => src.Extra)) //.ForMember(dest => dest.DoctorExtra, opt => opt.MapFrom(src => src.Extra))
.ForMember(dest => dest.DoctorScoringAverage, opt => opt.MapFrom(src => src.ScoringAverage)) .ForMember(dest => dest.DoctorScoringAverage, opt => opt.MapFrom(src => src.ScoringAverage))
.ForMember(dest => dest.DoctorAdjustFactor, opt => opt.MapFrom(src => src.AdjustFactor)) .ForMember(dest => dest.DoctorAdjustFactor, opt => opt.MapFrom(src => src.AdjustFactor))
.ForMember(dest => dest.DoctorScale, opt => opt.MapFrom(src => src.Scale)) .ForMember(dest => dest.DoctorScale, opt => opt.MapFrom(src => src.Scale))
.ForMember(dest => dest.DoctorEffic, opt => opt.MapFrom(src => src.Effic)) .ForMember(dest => dest.DoctorEffic, opt => opt.MapFrom(src => src.Effic))
.ForMember(dest => dest.DoctorGrant, opt => opt.MapFrom(src => src.Grant)); .ForMember(dest => dest.DoctorGrant, opt => opt.MapFrom(src => src.Grant))
.ReverseMap();
CreateMap<im_accountbasic, PerDataAccountBaisc>()
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => ((UnitType)src.UnitType).ToString())) //CreateMap<im_accountbasic, PerDataAccountBaisc>()
.ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.DoctorAccountingUnit)) // .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => ((UnitType)src.UnitType).ToString()))
.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department)) // .ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.DoctorAccountingUnit))
.ForMember(dest => dest.ManagerNumber, opt => opt.MapFrom(src => src.DoctorDirectorNumber)) // .ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
.ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.DoctorNumber)) // .ForMember(dest => dest.ManagerNumber, opt => opt.MapFrom(src => src.DoctorDirectorNumber))
.ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.DoctorBasicFactor)) // .ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.DoctorNumber))
.ForMember(dest => dest.SlopeFactor, opt => opt.MapFrom(src => src.DoctorSlopeFactor)) // .ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.DoctorBasicFactor))
.ForMember(dest => dest.OtherPerfor1, opt => opt.MapFrom(src => src.DoctorOtherPerfor1)) // .ForMember(dest => dest.SlopeFactor, opt => opt.MapFrom(src => src.DoctorSlopeFactor))
.ForMember(dest => dest.OtherPerfor2, opt => opt.MapFrom(src => src.DoctorOtherPerfor2)) // .ForMember(dest => dest.OtherPerfor1, opt => opt.MapFrom(src => src.DoctorOtherPerfor1))
.ForMember(dest => dest.Extra, opt => opt.MapFrom(src => src.DoctorExtra)) // .ForMember(dest => dest.OtherPerfor2, opt => opt.MapFrom(src => src.DoctorOtherPerfor2))
.ForMember(dest => dest.ScoringAverage, opt => opt.MapFrom(src => src.DoctorScoringAverage)) // .ForMember(dest => dest.Extra, opt => opt.MapFrom(src => src.DoctorExtra))
.ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.DoctorAdjustFactor)) // .ForMember(dest => dest.ScoringAverage, opt => opt.MapFrom(src => src.DoctorScoringAverage))
.ForMember(dest => dest.Scale, opt => opt.MapFrom(src => src.DoctorScale)) // .ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.DoctorAdjustFactor))
.ForMember(dest => dest.Effic, opt => opt.MapFrom(src => src.DoctorEffic)) // .ForMember(dest => dest.Scale, opt => opt.MapFrom(src => src.DoctorScale))
.ForMember(dest => dest.Grant, opt => opt.MapFrom(src => src.DoctorGrant)); // .ForMember(dest => dest.Effic, opt => opt.MapFrom(src => src.DoctorEffic))
// .ForMember(dest => dest.Grant, opt => opt.MapFrom(src => src.DoctorGrant));
CreateMap<PerDataSpecialUnit, im_specialunit>().ReverseMap(); CreateMap<PerDataSpecialUnit, im_specialunit>().ReverseMap();
//CreateMap<PerDataAccountDoctor, res_accountdoctor>(); //CreateMap<PerDataAccountDoctor, res_accountdoctor>();
...@@ -196,12 +197,17 @@ public AutoMapperConfigs() ...@@ -196,12 +197,17 @@ public AutoMapperConfigs()
CreateMap<ag_temp, SecondTempResponse>(); CreateMap<ag_temp, SecondTempResponse>();
CreateMap<ag_secondallot, SecondListResponse>().ReverseMap(); CreateMap<ag_secondallot, SecondListResponse>().ReverseMap();
CreateMap<im_employee_clinic, PerDataClinicEmployee>().ReverseMap();
CreateMap<im_employee_clinic, PerDataClinicEmployee>().ReverseMap();
CreateMap<im_employee_clinic, ComputeEmployee>() CreateMap<im_employee_clinic, ComputeEmployee>()
.ForMember(dest => dest.JobNumber, opt => opt.MapFrom(src => src.PersonnelNumber)) .ForMember(dest => dest.JobNumber, opt => opt.MapFrom(src => src.PersonnelNumber))
.ReverseMap(); .ReverseMap();
CreateMap<im_employee_logistics, PerDataLogisticsEmployee>().ReverseMap();
CreateMap<im_employee_logistics, ComputeEmployee>()
.ForMember(dest => dest.JobNumber, opt => opt.MapFrom(src => src.PersonnelNumber))
.ReverseMap();
CreateMap<per_budget_amount, BudgetResponse>() CreateMap<per_budget_amount, BudgetResponse>()
.ForMember(dest => dest.Type, opt => opt.MapFrom(src => 1)); .ForMember(dest => dest.Type, opt => opt.MapFrom(src => 1));
CreateMap<BudgetResponse, per_budget_amount>(); CreateMap<BudgetResponse, per_budget_amount>();
......
...@@ -67,9 +67,14 @@ public class ComputeEmployee ...@@ -67,9 +67,14 @@ public class ComputeEmployee
public Nullable<decimal> PostCoefficient { get; set; } public Nullable<decimal> PostCoefficient { get; set; }
/// <summary> /// <summary>
/// 参加工作时间 /// 效率绩效人数
/// </summary> /// </summary>
public Nullable<DateTime> WorkTime { get; set; } public Nullable<decimal> PermanentStaff { get; set; }
///// <summary>
///// 参加工作时间
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 考核得分率 /// 考核得分率
...@@ -96,10 +101,10 @@ public class ComputeEmployee ...@@ -96,10 +101,10 @@ public class ComputeEmployee
/// </summary> /// </summary>
public Nullable<decimal> OtherPerfor { get; set; } public Nullable<decimal> OtherPerfor { get; set; }
/// <summary> ///// <summary>
/// 医院奖罚 ///// 医院奖罚
/// </summary> ///// </summary>
public Nullable<decimal> Punishment { get; set; } //public Nullable<decimal> Punishment { get; set; }
/// <summary> /// <summary>
/// 调节系数 /// 调节系数
......
...@@ -81,7 +81,7 @@ public class ComputeResult ...@@ -81,7 +81,7 @@ public class ComputeResult
public Nullable<decimal> Attendance { get; set; } public Nullable<decimal> Attendance { get; set; }
/// <summary> /// <summary>
/// 医院奖罚(来自人员名单) /// 医院奖罚 来自5.2
/// </summary> /// </summary>
public Nullable<decimal> Punishment { get; set; } public Nullable<decimal> Punishment { get; set; }
...@@ -100,20 +100,20 @@ public class ComputeResult ...@@ -100,20 +100,20 @@ public class ComputeResult
/// </summary> /// </summary>
public Nullable<decimal> BaiscNormPerforTotal { get; set; } public Nullable<decimal> BaiscNormPerforTotal { get; set; }
/// <summary> ///// <summary>
/// 参加工作时间(来自人员名单) ///// 参加工作时间(来自人员名单)
/// </summary> ///// </summary>
public Nullable<DateTime> WorkTime { get; set; } //public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 绩效基础金额(计算) /// 绩效基础金额(计算)
/// </summary> /// </summary>
public Nullable<decimal> BaiscNormValue { get; set; } public Nullable<decimal> BaiscNormValue { get; set; }
/// <summary> ///// <summary>
/// 年资系数(来自人员名单) ///// 年资系数(来自人员名单)
/// </summary> ///// </summary>
public Nullable<decimal> WorkYear { get; set; } //public Nullable<decimal> WorkYear { get; set; }
/// <summary> /// <summary>
/// 实发绩效 /// 实发绩效
......
...@@ -40,8 +40,8 @@ public enum SheetType ...@@ -40,8 +40,8 @@ public enum SheetType
/// <summary> 无法识别 </summary> /// <summary> 无法识别 </summary>
[Description("无法识别")] [Description("无法识别")]
Unidentifiable = 1, Unidentifiable = 1,
/// <summary> 医院人员名单 </summary> /// <summary> 行政中高层 </summary>
[Description("医院人员名单")] [Description("行政中高层")]
Employee = 2, Employee = 2,
/// <summary> 收入 </summary> /// <summary> 收入 </summary>
[Description("收入")] [Description("收入")]
...@@ -81,17 +81,33 @@ public enum SheetType ...@@ -81,17 +81,33 @@ public enum SheetType
[Description("临床科室护士绩效测算表")] [Description("临床科室护士绩效测算表")]
ComputeNurseAccount = 14, ComputeNurseAccount = 14,
/// <summary> 临床人员名单 </summary> /// <summary> 业务中层 </summary>
[Description("临床人员名单")] [Description("业务中层")]
ClinicEmployee = 15, ClinicEmployee = 15,
/// <summary> 特殊临床科室医护绩效测算基础 </summary> /// <summary> 特殊临床科室医护绩效测算基础 </summary>
[Description("特殊临床科室医护绩效测算基础")] [Description("特殊临床科室医护绩效测算基础")]
AccountBasicSpecial = 16, AccountBasicSpecial = 16,
/// <summary> 临床科室医护绩效考核表 </summary> /// <summary> 科室绩效医院奖罚 </summary>
[Description("临床科室医护绩效考核表")] [Description("科室绩效医院奖罚")]
AccountAssess = 17, AccountExtra = 17,
/// <summary> 业务中层行政中高层医院奖罚 </summary>
[Description("业务中层行政中高层医院奖罚")]
PersonExtra = 18,
/// <summary> 科室药占比考核 </summary>
[Description("科室药占比考核")]
AccountDrugAssess = 19,
/// <summary> 科室材料考核 </summary>
[Description("科室材料考核")]
AccountMaterialsAssess = 20,
/// <summary> 行政后勤 </summary>
[Description("行政后勤")]
LogisticsEmployee = 21,
} }
/// <summary> /// <summary>
......
...@@ -23,6 +23,14 @@ public class PerData : IPerData ...@@ -23,6 +23,14 @@ public class PerData : IPerData
/// </summary> /// </summary>
public string TypeName { get; set; } public string TypeName { get; set; }
/// <summary> /// <summary>
/// 人员姓名
/// </summary>
public string EmployeeName { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public string JobNumber { get; set; }
/// <summary>
/// 单元格注释 /// 单元格注释
/// </summary> /// </summary>
public string Annotation { get; set; } public string Annotation { get; set; }
......
...@@ -28,15 +28,15 @@ public class PerDataAccountBaisc : IPerData ...@@ -28,15 +28,15 @@ public class PerDataAccountBaisc : IPerData
/// </summary> /// </summary>
public string AccountingUnit { get; set; } public string AccountingUnit { get; set; }
/// <summary> ///// <summary>
/// 科室名称 ///// 科室名称
/// </summary> ///// </summary>
public string Department { get; set; } //public string Department { get; set; }
/// <summary> ///// <summary>
/// 定科人数 ///// 效率绩效人数
/// </summary> ///// </summary>
public decimal PermanentStaff { get; set; } //public decimal PermanentStaff { get; set; }
/// <summary> /// <summary>
/// 科主任/护士长数量 /// 科主任/护士长数量
...@@ -53,10 +53,10 @@ public class PerDataAccountBaisc : IPerData ...@@ -53,10 +53,10 @@ public class PerDataAccountBaisc : IPerData
/// </summary> /// </summary>
public decimal BasicFactor { get; set; } public decimal BasicFactor { get; set; }
/// <summary> ///// <summary>
/// 倾斜系数 ///// 倾斜系数
/// </summary> ///// </summary>
public decimal SlopeFactor { get; set; } //public decimal SlopeFactor { get; set; }
/// <summary> /// <summary>
/// 其他绩效1 /// 其他绩效1
...@@ -78,10 +78,10 @@ public class PerDataAccountBaisc : IPerData ...@@ -78,10 +78,10 @@ public class PerDataAccountBaisc : IPerData
/// </summary> /// </summary>
public decimal MaterialsExtra { get; set; } public decimal MaterialsExtra { get; set; }
/// <summary> ///// <summary>
/// 医院奖罚 ///// 医院奖罚
/// </summary> ///// </summary>
public decimal Extra { get; set; } //public decimal Extra { get; set; }
/// <summary> /// <summary>
/// 考核对分率 /// 考核对分率
...@@ -108,20 +108,20 @@ public class PerDataAccountBaisc : IPerData ...@@ -108,20 +108,20 @@ public class PerDataAccountBaisc : IPerData
/// </summary> /// </summary>
public decimal Grant { get; set; } public decimal Grant { get; set; }
/// <summary> ///// <summary>
/// 保底绩效参考标准 ///// 保底绩效参考标准
/// </summary> ///// </summary>
public string MinimumReference { get; set; } //public string MinimumReference { get; set; }
/// <summary> ///// <summary>
/// 保底绩效系数 ///// 保底绩效系数
/// </summary> ///// </summary>
public Nullable<decimal> MinimumFactor { get; set; } //public Nullable<decimal> MinimumFactor { get; set; }
/// <summary> ///// <summary>
/// 工作量倾斜系数 ///// 工作量倾斜系数
/// </summary> ///// </summary>
public Nullable<decimal> WorkSlopeFactor { get; set; } //public Nullable<decimal> WorkSlopeFactor { get; set; }
#endregion #endregion
...@@ -132,10 +132,10 @@ public class PerDataAccountBaisc : IPerData ...@@ -132,10 +132,10 @@ public class PerDataAccountBaisc : IPerData
/// </summary> /// </summary>
public Nullable<decimal> MedicineFactor { get; set; } public Nullable<decimal> MedicineFactor { get; set; }
/// <summary> ///// <summary>
/// 保底绩效金额 ///// 保底绩效金额
/// </summary> ///// </summary>
public Nullable<decimal> MinimumFee { get; set; } //public Nullable<decimal> MinimumFee { get; set; }
/// <summary> /// <summary>
/// 科室业绩 /// 科室业绩
......
...@@ -42,9 +42,14 @@ public class PerDataClinicEmployee : IPerData ...@@ -42,9 +42,14 @@ public class PerDataClinicEmployee : IPerData
public Nullable<decimal> Basics { get; set; } public Nullable<decimal> Basics { get; set; }
/// <summary> /// <summary>
/// 岗位系 /// 效率绩效人
/// </summary> /// </summary>
public Nullable<decimal> PostCoefficient { get; set; } public decimal PermanentStaff { get; set; }
///// <summary>
///// 岗位系数
///// </summary>
//public Nullable<decimal> PostCoefficient { get; set; }
/// <summary> /// <summary>
/// 效率绩效系数 /// 效率绩效系数
...@@ -61,10 +66,10 @@ public class PerDataClinicEmployee : IPerData ...@@ -61,10 +66,10 @@ public class PerDataClinicEmployee : IPerData
/// </summary> /// </summary>
public Nullable<decimal> Management { get; set; } public Nullable<decimal> Management { get; set; }
/// <summary> ///// <summary>
/// 参加工作时间 ///// 参加工作时间
/// </summary> ///// </summary>
public Nullable<DateTime> WorkTime { get; set; } //public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 考核得分率 /// 考核得分率
...@@ -77,14 +82,19 @@ public class PerDataClinicEmployee : IPerData ...@@ -77,14 +82,19 @@ public class PerDataClinicEmployee : IPerData
public Nullable<decimal> Attendance { get; set; } public Nullable<decimal> Attendance { get; set; }
/// <summary> /// <summary>
/// 其他绩效 /// 其他管理绩效
/// </summary> /// </summary>
public Nullable<decimal> OthePerfor { get; set; } public Nullable<decimal> OtheManagementPerfor { get; set; }
/// <summary> ///// <summary>
/// 医院奖罚 ///// 其他绩效
/// </summary> ///// </summary>
public Nullable<decimal> Punishment { get; set; } //public Nullable<decimal> OthePerfor { get; set; }
///// <summary>
///// 医院奖罚
///// </summary>
//public Nullable<decimal> Punishment { get; set; }
/// <summary> /// <summary>
/// 调节系数 /// 调节系数
......
...@@ -56,10 +56,10 @@ public class PerDataEmployee : IPerData ...@@ -56,10 +56,10 @@ public class PerDataEmployee : IPerData
/// </summary> /// </summary>
public Nullable<decimal> PostCoefficient { get; set; } public Nullable<decimal> PostCoefficient { get; set; }
/// <summary> ///// <summary>
/// 参加工作时间 ///// 参加工作时间
/// </summary> ///// </summary>
public Nullable<DateTime> WorkTime { get; set; } //public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 考核得分率 /// 考核得分率
...@@ -76,15 +76,15 @@ public class PerDataEmployee : IPerData ...@@ -76,15 +76,15 @@ public class PerDataEmployee : IPerData
///// </summary> ///// </summary>
//public Nullable<decimal> Workload { get; set; } //public Nullable<decimal> Workload { get; set; }
/// <summary> ///// <summary>
/// 其他绩效 ///// 其他绩效
/// </summary> ///// </summary>
public Nullable<decimal> OthePerfor { get; set; } //public Nullable<decimal> OthePerfor { get; set; }
/// <summary> ///// <summary>
/// 医院奖罚 ///// 医院奖罚
/// </summary> ///// </summary>
public Nullable<decimal> Punishment { get; set; } //public Nullable<decimal> Punishment { get; set; }
/// <summary> /// <summary>
/// 调节系数 /// 调节系数
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerDataLogisticsEmployee : IPerData
{
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 绩效基数核算参考对象
/// </summary>
public string FitPeople { get; set; }
/// <summary>
/// 绩效基础核算参考值
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; }
/// <summary>
/// 科室类别(例如 医技科室 临床科室 其他科室)
/// </summary>
public string AccountType { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public string JobNumber { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string DoctorName { get; set; }
/// <summary>
/// 职务分类
/// </summary>
public string JobTitle { get; set; }
/// <summary>
/// 岗位系数
/// </summary>
public Nullable<decimal> PostCoefficient { get; set; }
/// <summary>
/// 出勤率
/// </summary>
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 其他绩效
/// </summary>
public Nullable<decimal> OthePerfor { get; set; }
/// <summary>
/// 行号
/// </summary>
public int RowNumber { get; set; }
}
}
...@@ -36,25 +36,26 @@ public class PerDataSpecialUnit : IPerData ...@@ -36,25 +36,26 @@ public class PerDataSpecialUnit : IPerData
/// </summary> /// </summary>
public Nullable<decimal> QuantitativeIndicatorsValue { get; set; } public Nullable<decimal> QuantitativeIndicatorsValue { get; set; }
/// <summary> ///// <summary>
/// 考核得分率 ///// 考核得分率
/// </summary> ///// </summary>
public Nullable<decimal> ScoringAverage { get; set; } //public Nullable<decimal> ScoringAverage { get; set; }
/// <summary> ///// <summary>
/// 其他绩效 ///// 其他绩效
/// </summary> ///// </summary>
public Nullable<decimal> OtherPerfor { get; set; } //public Nullable<decimal> OtherPerfor { get; set; }
/// <summary> ///// <summary>
/// 医院奖罚 ///// 医院奖罚
/// </summary> ///// </summary>
public Nullable<decimal> Punishment { get; set; } //public Nullable<decimal> Punishment { get; set; }
///// <summary>
///// 调节系数
///// </summary>
//public Nullable<decimal> Adjust { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public Nullable<decimal> Adjust { get; set; }
public int RowNumber { get; set; } public int RowNumber { get; set; }
/// <summary> /// <summary>
......
...@@ -11,22 +11,22 @@ public class PerSheetHeader ...@@ -11,22 +11,22 @@ public class PerSheetHeader
public static List<(string, Func<im_employee, object>, int, int, bool, bool, bool, string)> employeeHeaders = public static List<(string, Func<im_employee, object>, int, int, bool, bool, bool, string)> employeeHeaders =
new List<(string, Func<im_employee, object>, int, int, bool, bool, bool, string)> new List<(string, Func<im_employee, object>, int, int, bool, bool, bool, string)>
{ {
("核算单元类型", (t) => t.AccountType, 1, 1, false, false, false,"AccountType"), ("人员分类", (t) => t.AccountType, 1, 1, false, false, false,"AccountType"),
("核算单元", (t) => t.AccountingUnit, 1, 1, false, false, false,"AccountingUnit"), ("核算单元", (t) => t.AccountingUnit, 1, 1, false, false, false,"AccountingUnit"),
("人员工号", (t) => t.PersonnelNumber, 1, 1, false, false, false,"PersonnelNumber"), ("人员工号", (t) => t.PersonnelNumber, 1, 1, false, false, false,"PersonnelNumber"),
("医生姓名", (t) => t.DoctorName, 1, 1, false, false, false,"DoctorName"), ("医生姓名", (t) => t.DoctorName, 1, 1, false, false, false,"DoctorName"),
("职", (t) => t.JobTitle, 1, 1, false, true, false,"JobTitle"), ("职务分类", (t) => t.JobTitle, 1, 1, false, true, false,"JobTitle"),
("绩效基数核算参考对象", (t) => t.FitPeople, 1, 1, false, false, false, "FitPeople"), ("绩效基数核算参考对象", (t) => t.FitPeople, 1, 1, false, false, false, "FitPeople"),
("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"), ("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"),
("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"), //("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"),
("考核得分率", (t) => Math.Round(t.ScoreAverageRate.Value * 100, 2) , 1, 1, false, true, true, "ScoreAverageRate"), ("考核得分率", (t) => Math.Round(t.ScoreAverageRate.Value * 100, 2) , 1, 1, false, true, true, "ScoreAverageRate"),
("出勤率", (t) => Math.Round(t.Attendance.Value * 100, 2), 1, 1, false, true, true, "Attendance"), ("出勤率", (t) => Math.Round(t.Attendance.Value * 100, 2), 1, 1, false, true, true, "Attendance"),
("核算单元医生数", (t) => t.PeopleNumber, 1, 1, false, true, false, "PeopleNumber"), //("核算单元医生数", (t) => t.PeopleNumber, 1, 1, false, true, false, "PeopleNumber"),
("工作量绩效", (t) =>t.Workload, 1, 1, false, true, false, "Workload"), //("工作量绩效", (t) =>t.Workload, 1, 1, false, true, false, "Workload"),
("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"), //("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"), //("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"), ("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"),
("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"), //("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"),
}; };
...@@ -38,18 +38,42 @@ public class PerSheetHeader ...@@ -38,18 +38,42 @@ public class PerSheetHeader
("核算单元", (t) => t.AccountingUnit, 1, 1, false, false, false, "AccountingUnit"), ("核算单元", (t) => t.AccountingUnit, 1, 1, false, false, false, "AccountingUnit"),
("人员工号", (t) => t.PersonnelNumber, 1, 1, false, false, false, "PersonnelNumber"), ("人员工号", (t) => t.PersonnelNumber, 1, 1, false, false, false, "PersonnelNumber"),
("医生姓名", (t) => t.DoctorName, 1, 1, false, false, false, "DoctorName"), ("医生姓名", (t) => t.DoctorName, 1, 1, false, false, false, "DoctorName"),
("职称", (t) => t.JobTitle, 1, 1, false, true, false, "JobTitle"), ("职务分类", (t) => t.JobTitle, 1, 1, false, true, false, "JobTitle"),
("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"), //("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"),
("基础绩效系数", (t) => Math.Round(t.Basics.Value * 100, 2), 1, 1, false, true, false, "Basics"),
("效率绩效人数", (t) => Math.Round(t.PermanentStaff.Value * 100, 2), 1, 1, false, true, true, "PermanentStaff"),
("效率绩效系数", (t) => Math.Round(t.Efficiency.Value * 100, 2), 1, 1, false, true, true, "Efficiency"), ("效率绩效系数", (t) => Math.Round(t.Efficiency.Value * 100, 2), 1, 1, false, true, true, "Efficiency"),
("规模绩效系数", (t) => Math.Round(t.Scale.Value * 100, 2), 1, 1, false, true, true, "Scale"), ("规模绩效系数", (t) => Math.Round(t.Scale.Value * 100, 2), 1, 1, false, true, true, "Scale"),
("管理绩效发放系数", (t) => Math.Round(t.Management.Value * 100, 2), 1, 1, false, true, true, "Management"), ("管理绩效发放系数", (t) => Math.Round(t.Management.Value * 100, 2), 1, 1, false, true, true, "Management"),
("考核得分率", (t) => Math.Round(t.ScoreAverageRate.Value * 100, 2), 1, 1, false, true, true, "ScoreAverageRate"), ("考核得分率", (t) => Math.Round(t.ScoreAverageRate.Value * 100, 2), 1, 1, false, true, true, "ScoreAverageRate"),
("出勤率", (t) => Math.Round(t.Attendance.Value * 100, 2), 1, 1, false, true, true, "Attendance"), ("出勤率", (t) => Math.Round(t.Attendance.Value * 100, 2), 1, 1, false, true, true, "Attendance"),
("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"), ("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"), //("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"), ("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"),
}; };
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有%
public static List<(string, Func<im_employee_logistics, object>, int, int, bool, bool, bool, string)> employeeLogisticsHeaders =
new List<(string, Func<im_employee_logistics, object>, int, int, bool, bool, bool, string)>
{
("人员分类", (t) => t.AccountType, 1, 1, false, false, false,"AccountType"),
("核算单元", (t) => t.AccountingUnit, 1, 1, false, false, false,"AccountingUnit"),
("人员工号", (t) => t.PersonnelNumber, 1, 1, false, false, false,"PersonnelNumber"),
("人员姓名", (t) => t.DoctorName, 1, 1, false, false, false,"DoctorName"),
("职务分类", (t) => t.JobTitle, 1, 1, false, true, false,"JobTitle"),
("绩效基数核算参考对象", (t) => t.FitPeople, 1, 1, false, false, false, "FitPeople"),
("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"),
//("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"),
//("考核得分率", (t) => Math.Round(t.ScoreAverageRate.Value * 100, 2) , 1, 1, false, true, true, "ScoreAverageRate"),
("出勤率", (t) => Math.Round(t.Attendance.Value * 100, 2), 1, 1, false, true, true, "Attendance"),
//("核算单元医生数", (t) => t.PeopleNumber, 1, 1, false, true, false, "PeopleNumber"),
//("工作量绩效", (t) =>t.Workload, 1, 1, false, true, false, "Workload"),
("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
//("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
//("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"),
//("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"),
};
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有% // Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有%
public static List<(string, Func<im_specialunit, object>, int, int, bool, bool, bool, string)> specialUnitHeaders = public static List<(string, Func<im_specialunit, object>, int, int, bool, bool, bool, string)> specialUnitHeaders =
...@@ -61,10 +85,10 @@ public class PerSheetHeader ...@@ -61,10 +85,10 @@ public class PerSheetHeader
("量化指标", (t) => t.QuantitativeIndicators, 1, 1, false, true, false, "QuantitativeIndicators"), ("量化指标", (t) => t.QuantitativeIndicators, 1, 1, false, true, false, "QuantitativeIndicators"),
("数量", (t) => t.Quantity, 1, 1, false, true, false, "Quantity"), ("数量", (t) => t.Quantity, 1, 1, false, true, false, "Quantity"),
("量化指标绩效分值", (t) => t.QuantitativeIndicatorsValue, 1, 1, false, true, false, "QuantitativeIndicatorsValue"), ("量化指标绩效分值", (t) => t.QuantitativeIndicatorsValue, 1, 1, false, true, false, "QuantitativeIndicatorsValue"),
("考核得分率", (t) => Math.Round(t.ScoringAverage.Value * 100, 2), 1, 1, false, true, true, "ScoringAverage"), //("考核得分率", (t) => Math.Round(t.ScoringAverage.Value * 100, 2), 1, 1, false, true, true, "ScoringAverage"),
("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"), //("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"), //("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"), //("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"),
}; };
} }
} }
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class AccountUnitTotal
{
public string UnitType { get; set; }
public string AccountingUnit { get; set; }
public decimal? TotelValue { get; set; }
}
public class EmpolyeeTotal : AccountUnitTotal
{
public string JobNumber { get; set; }
public string EmployeeName { get; set; }
}
}
...@@ -97,6 +97,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options) ...@@ -97,6 +97,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
/// <summary> </summary> /// <summary> </summary>
public virtual DbSet<im_employee_clinic> im_employee_clinic { get; set; } public virtual DbSet<im_employee_clinic> im_employee_clinic { get; set; }
/// <summary> </summary> /// <summary> </summary>
public virtual DbSet<im_employee_logistics> im_employee_logistics { get; set; }
/// <summary> </summary>
public virtual DbSet<im_header> im_header { get; set; } public virtual DbSet<im_header> im_header { get; set; }
/// <summary> 特殊科室核算 </summary> /// <summary> 特殊科室核算 </summary>
public virtual DbSet<im_specialunit> im_specialunit { get; set; } public virtual DbSet<im_specialunit> im_specialunit { get; set; }
......
...@@ -46,10 +46,10 @@ public class im_accountbasic ...@@ -46,10 +46,10 @@ public class im_accountbasic
/// </summary> /// </summary>
public string NurseAccountingUnit { get; set; } public string NurseAccountingUnit { get; set; }
/// <summary> ///// <summary>
/// 科室 ///// 科室
/// </summary> ///// </summary>
public string Department { get; set; } //public string Department { get; set; }
/// <summary> /// <summary>
/// 是否带入平均计算 是 否 /// 是否带入平均计算 是 否
...@@ -76,10 +76,10 @@ public class im_accountbasic ...@@ -76,10 +76,10 @@ public class im_accountbasic
/// </summary> /// </summary>
public Nullable<decimal> DoctorBasicFactor { get; set; } public Nullable<decimal> DoctorBasicFactor { get; set; }
/// <summary> ///// <summary>
/// 倾斜系数 ///// 倾斜系数
/// </summary> ///// </summary>
public Nullable<decimal> DoctorSlopeFactor { get; set; } //public Nullable<decimal> DoctorSlopeFactor { get; set; }
/// <summary> /// <summary>
/// 规模绩效系数 /// 规模绩效系数
...@@ -116,10 +116,10 @@ public class im_accountbasic ...@@ -116,10 +116,10 @@ public class im_accountbasic
/// </summary> /// </summary>
public Nullable<decimal> MaterialsExtra { get; set; } public Nullable<decimal> MaterialsExtra { get; set; }
/// <summary> ///// <summary>
/// 医院奖罚 ///// 医院奖罚
/// </summary> ///// </summary>
public Nullable<decimal> DoctorExtra { get; set; } //public Nullable<decimal> DoctorExtra { get; set; }
/// <summary> /// <summary>
/// 考核对分率 /// 考核对分率
......
...@@ -77,6 +77,11 @@ public class im_employee_clinic ...@@ -77,6 +77,11 @@ public class im_employee_clinic
public Nullable<decimal> PostCoefficient { get; set; } public Nullable<decimal> PostCoefficient { get; set; }
/// <summary> /// <summary>
/// 效率绩效人数
/// </summary>
public Nullable<decimal> PermanentStaff { get; set; }
/// <summary>
/// 效率绩效系数 /// 效率绩效系数
/// </summary> /// </summary>
public Nullable<decimal> Efficiency { get; set; } public Nullable<decimal> Efficiency { get; set; }
......
//-----------------------------------------------------------------------
// <copyright file=" im_employee_clinic.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("im_employee_logistics")]
public class im_employee_logistics
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
/// sheet页id
/// </summary>
public Nullable<int> SheetID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> RowNumber { get; set; }
/// <summary>
/// 科室类别(例如 医技科室 临床科室 其他科室)
/// </summary>
public string AccountType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string Department { get; set; }
/// <summary>
/// 绩效基数核算参考对象
/// </summary>
public string FitPeople { get; set; }
/// <summary>
/// 绩效基础核算参考值
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 医生姓名
/// </summary>
public string DoctorName { get; set; }
/// <summary>
/// 职称
/// </summary>
public string JobTitle { get; set; }
/// <summary>
/// 岗位系数
/// </summary>
public Nullable<decimal> PostCoefficient { get; set; }
///// <summary>
///// 参加工作时间
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 考核得分率
/// </summary>
public Nullable<decimal> ScoreAverageRate { get; set; }
/// <summary>
/// 出勤率
/// </summary>
public Nullable<decimal> Attendance { get; set; }
///// <summary>
///// 核算单元医生数
///// </summary>
//public Nullable<int> PeopleNumber { get; set; }
///// <summary>
///// 工作量绩效
///// </summary>
//public Nullable<decimal> Workload { get; set; }
/// <summary>
/// 其他绩效
/// </summary>
public Nullable<decimal> OtherPerfor { get; set; }
///// <summary>
///// 医院奖罚
///// </summary>
//public Nullable<decimal> Punishment { get; set; }
///// <summary>
///// 调节系数
///// </summary>
//public Nullable<decimal> Adjust { get; set; }
///// <summary>
///// 发放系数
///// </summary>
//public Nullable<decimal> Grant { get; set; }
/// <summary>
///
/// </summary>
public Nullable<DateTime> UpdateDate { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> UpdateUser { get; set; }
}
}
...@@ -51,10 +51,10 @@ public class res_account ...@@ -51,10 +51,10 @@ public class res_account
/// </summary> /// </summary>
public string IncludeAvgCalculate { get; set; } public string IncludeAvgCalculate { get; set; }
/// <summary> ///// <summary>
/// 定科人数 ///// 定科人数
/// </summary> ///// </summary>
public Nullable<decimal> PermanentStaff { get; set; } //public Nullable<decimal> PermanentStaff { get; set; }
/// <summary> /// <summary>
/// 科主任/护士长数量 /// 科主任/护士长数量
......
...@@ -25,6 +25,7 @@ public int DeleteData(int allotId) ...@@ -25,6 +25,7 @@ public int DeleteData(int allotId)
"im_data", "im_data",
"im_employee", "im_employee",
"im_employee_clinic", "im_employee_clinic",
"im_employee_logistics",
"im_header", "im_header",
"im_specialunit", "im_specialunit",
"per_sheet", "per_sheet",
......
//-----------------------------------------------------------------------
// <copyright file=" im_employee_clinic.cs">
// * FileName: im_employee_clinic.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// im_employee_clinic Repository
/// </summary>
public partial class PerforImemployeelogisticsRepository : PerforRepository<im_employee_logistics>
{
public PerforImemployeelogisticsRepository(PerformanceDbContext context) : base(context)
{
}
}
}
...@@ -45,7 +45,39 @@ public List<res_baiscnorm> ComputeAvg(List<res_baiscnorm> baiscnormList, List<im ...@@ -45,7 +45,39 @@ public List<res_baiscnorm> ComputeAvg(List<res_baiscnorm> baiscnormList, List<im
} }
/// <summary> /// <summary>
/// 院领导、行政中层、行政工勤 平均值 /// 行政工勤 平均值
/// </summary>
/// <param name="computes"></param>
/// <returns></returns>
public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, List<ComputeResult> computes, List<im_employee_logistics> empolyeeList)
{
var keyList = new[]
{
//行政绩效平均值项目
new { type = AccountUnitType.行政工勤, reference = PerforType.行政工勤 },
};
foreach (var item in keyList)
{
var count = empolyeeList.Count(t => t.AccountType == item.type.ToString());
if (count > 0)
{
var dataList = computes.Where(t => t.AccountType == item.type.ToString());
var baiscnorm = new res_baiscnorm
{
PositionName = EnumHelper.GetDescription(item.reference),
TotelNumber = count,
TotelValue = dataList.Sum(t => t.GiveFee),
AvgValue = Math.Round((dataList.Sum(t => t.GiveFee) / count) ?? 0)
};
baiscnormList.Add(baiscnorm);
}
}
return baiscnormList;
}
/// <summary>
/// 院领导、行政中层 平均值
/// </summary> /// </summary>
/// <param name="computes"></param> /// <param name="computes"></param>
/// <returns></returns> /// <returns></returns>
...@@ -55,7 +87,6 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li ...@@ -55,7 +87,6 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
{ {
//行政绩效平均值项目 //行政绩效平均值项目
new { type = AccountUnitType.行政中层, reference = PerforType.行政中层 }, new { type = AccountUnitType.行政中层, reference = PerforType.行政中层 },
new { type = AccountUnitType.行政工勤, reference = PerforType.行政工勤 },
new { type = AccountUnitType.行政高层, reference = PerforType.行政高层 }, new { type = AccountUnitType.行政高层, reference = PerforType.行政高层 },
}; };
...@@ -70,7 +101,7 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li ...@@ -70,7 +101,7 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
PositionName = EnumHelper.GetDescription(item.reference), PositionName = EnumHelper.GetDescription(item.reference),
TotelNumber = count, TotelNumber = count,
TotelValue = dataList.Sum(t => t.GiveFee), TotelValue = dataList.Sum(t => t.GiveFee),
AvgValue = dataList.Sum(t => t.GiveFee) / count AvgValue = Math.Round((dataList.Sum(t => t.GiveFee) / count) ?? 0)
}; };
baiscnormList.Add(baiscnorm); baiscnormList.Add(baiscnorm);
} }
...@@ -145,5 +176,5 @@ public List<res_baiscnorm> DocterNurseBaiscnorm(List<res_baiscnorm> baiscnormLis ...@@ -145,5 +176,5 @@ public List<res_baiscnorm> DocterNurseBaiscnorm(List<res_baiscnorm> baiscnormLis
} }
return baiscnormList; return baiscnormList;
} }
} }
} }
...@@ -29,6 +29,7 @@ public class ImportDataService : IAutoInjection ...@@ -29,6 +29,7 @@ public class ImportDataService : IAutoInjection
private PerforImaccountbasicRepository perforImaccountbasicRepository; private PerforImaccountbasicRepository perforImaccountbasicRepository;
private PerforImspecialunitRepository perforImspecialunitRepository; private PerforImspecialunitRepository perforImspecialunitRepository;
private PerforImemployeeclinicRepository perforImemployeeclinicRepository; private PerforImemployeeclinicRepository perforImemployeeclinicRepository;
private PerforImemployeelogisticsRepository perforImemployeelogisticsRepository;
//private PerforLogdbugRepository logdbug; //private PerforLogdbugRepository logdbug;
private readonly LogManageService logManageService; private readonly LogManageService logManageService;
private ILogger<ImportDataService> logger; private ILogger<ImportDataService> logger;
...@@ -42,6 +43,7 @@ public class ImportDataService : IAutoInjection ...@@ -42,6 +43,7 @@ public class ImportDataService : IAutoInjection
PerforImaccountbasicRepository perforImaccountbasicRepository, PerforImaccountbasicRepository perforImaccountbasicRepository,
PerforImspecialunitRepository perforImspecialunitRepository, PerforImspecialunitRepository perforImspecialunitRepository,
PerforImemployeeclinicRepository perforImemployeeclinicRepository, PerforImemployeeclinicRepository perforImemployeeclinicRepository,
PerforImemployeelogisticsRepository perforImemployeelogisticsRepository,
//PerforLogdbugRepository logdbug //PerforLogdbugRepository logdbug
LogManageService logManageService, LogManageService logManageService,
ILogger<ImportDataService> logger) ILogger<ImportDataService> logger)
...@@ -55,6 +57,7 @@ public class ImportDataService : IAutoInjection ...@@ -55,6 +57,7 @@ public class ImportDataService : IAutoInjection
this.perforImaccountbasicRepository = perforImaccountbasicRepository; this.perforImaccountbasicRepository = perforImaccountbasicRepository;
this.perforImspecialunitRepository = perforImspecialunitRepository; this.perforImspecialunitRepository = perforImspecialunitRepository;
this.perforImemployeeclinicRepository = perforImemployeeclinicRepository; this.perforImemployeeclinicRepository = perforImemployeeclinicRepository;
this.perforImemployeelogisticsRepository = perforImemployeelogisticsRepository;
//this.logdbug = logdbug; //this.logdbug = logdbug;
this.logManageService = logManageService; this.logManageService = logManageService;
this.logger = logger; this.logger = logger;
...@@ -164,7 +167,7 @@ private void SaveEmployee(PerSheet sheet, int allotId) ...@@ -164,7 +167,7 @@ private void SaveEmployee(PerSheet sheet, int allotId)
var imdata = Mapper.Map<im_employee>(data); var imdata = Mapper.Map<im_employee>(data);
imdata.SheetID = imsheet.ID; imdata.SheetID = imsheet.ID;
imdata.AllotID = allotId; imdata.AllotID = allotId;
imdata.OtherPerfor = data.OthePerfor; //imdata.OtherPerfor = data.OthePerfor;
addList.Add(imdata); addList.Add(imdata);
} }
perforImEmployeeRepository.AddRange(addList.ToArray()); perforImEmployeeRepository.AddRange(addList.ToArray());
...@@ -203,13 +206,52 @@ private void SaveClinicEmployee(PerSheet sheet, int allotId) ...@@ -203,13 +206,52 @@ private void SaveClinicEmployee(PerSheet sheet, int allotId)
var imdata = Mapper.Map<im_employee_clinic>(data); var imdata = Mapper.Map<im_employee_clinic>(data);
imdata.SheetID = imsheet.ID; imdata.SheetID = imsheet.ID;
imdata.AllotID = allotId; imdata.AllotID = allotId;
imdata.OtherPerfor = data.OthePerfor; //imdata.OtherPerfor = data.OthePerfor;
addList.Add(imdata); addList.Add(imdata);
} }
perforImemployeeclinicRepository.AddRange(addList.ToArray()); perforImemployeeclinicRepository.AddRange(addList.ToArray());
} }
/// <summary> /// <summary>
/// 保存临床人员
/// </summary>
/// <param name="sheet"></param>
/// <param name="allotId"></param>
/// <returns></returns>
private void SaveLogisticsEmployee(PerSheet sheet, int allotId)
{
var imsheet = new per_sheet { AllotID = allotId, SheetName = sheet.SheetName, Source = 1, SheetType = (int)sheet.SheetType };
perforPerSheetRepository.Add(imsheet);
var dataList = sheet.PerData.Select(t => (PerDataLogisticsEmployee)t);
//新上传名单中无人员名单,取到最后日期的数据
if (dataList == null || dataList.Count() <= 0)
{
var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId);
var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == allot.HospitalId)
.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month);
foreach (var item in allotList)
{
var employeeList = perforImemployeelogisticsRepository.GetEntities(t => t.AllotID == item.ID);
if (employeeList != null && employeeList.Count > 0)
{
dataList = Mapper.Map<List<PerDataLogisticsEmployee>>(employeeList);
break;
}
}
}
List<im_employee_logistics> addList = new List<im_employee_logistics>();
foreach (var data in dataList)
{
var imdata = Mapper.Map<im_employee_logistics>(data);
imdata.SheetID = imsheet.ID;
imdata.AllotID = allotId;
//imdata.OtherPerfor = data.OthePerfor;
addList.Add(imdata);
}
perforImemployeelogisticsRepository.AddRange(addList.ToArray());
}
/// <summary>
/// 保存科室绩效基础表 /// 保存科室绩效基础表
/// </summary> /// </summary>
/// <param name="sheet"></param> /// <param name="sheet"></param>
...@@ -345,6 +387,10 @@ private bool Save(PerExcel excel, int allotId) ...@@ -345,6 +387,10 @@ private bool Save(PerExcel excel, int allotId)
{ {
SaveEmployee(sheet, allotId); SaveEmployee(sheet, allotId);
} }
else if (sheet.SheetType == SheetType.LogisticsEmployee)
{
SaveLogisticsEmployee(sheet, allotId);
}
else if (sheet.SheetType == SheetType.ClinicEmployee) else if (sheet.SheetType == SheetType.ClinicEmployee)
{ {
SaveClinicEmployee(sheet, allotId); SaveClinicEmployee(sheet, allotId);
......
...@@ -292,13 +292,13 @@ public void Generate(per_allot allot, string mail) ...@@ -292,13 +292,13 @@ public void Generate(per_allot allot, string mail)
excel = importDataService.ReadDataAndSave(allot); excel = importDataService.ReadDataAndSave(allot);
UpdateAllotStates(allot.ID, (int)AllotStates.InCheckData, EnumHelper.GetDescription(AllotStates.InCheckData)); UpdateAllotStates(allot.ID, (int)AllotStates.InCheckData, EnumHelper.GetDescription(AllotStates.InCheckData));
if (!checkDataService.Check(excel, allot)) //if (!checkDataService.Check(excel, allot))
{ //{
UpdateAllotStates(allot.ID, (int)AllotStates.CheckFail, EnumHelper.GetDescription(AllotStates.CheckFail)); // UpdateAllotStates(allot.ID, (int)AllotStates.CheckFail, EnumHelper.GetDescription(AllotStates.CheckFail));
//SendEmail(allot, mail, 3, time); // //SendEmail(allot, mail, 3, time);
logManageService.WriteMsg("绩效数据校验失败", "详情可至“更多 -- 查看日志”查看", 3, allot.ID, "ReceiveMessage", true); // logManageService.WriteMsg("绩效数据校验失败", "详情可至“更多 -- 查看日志”查看", 3, allot.ID, "ReceiveMessage", true);
return; // return;
} //}
} }
UpdateAllotStates(allot.ID, (int)AllotStates.InGenerate, EnumHelper.GetDescription(AllotStates.InGenerate)); UpdateAllotStates(allot.ID, (int)AllotStates.InGenerate, EnumHelper.GetDescription(AllotStates.InGenerate));
...@@ -315,45 +315,63 @@ public void Generate(per_allot allot, string mail) ...@@ -315,45 +315,63 @@ public void Generate(per_allot allot, string mail)
var (list, mergeSheets) = processComputService.MergeCompute(excel, allot.ID); var (list, mergeSheets) = processComputService.MergeCompute(excel, allot.ID);
processComputService.Save(list, allot.ID); processComputService.Save(list, allot.ID);
//计算保底绩效参考标准(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效) ////计算保底绩效参考标准(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)
logManageService.WriteMsg("计算保底绩效参考标准值", "正在保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("计算保底绩效参考标准值", "正在保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效", 1, allot.ID, "ReceiveMessage", true);
var minimumBaiscnorm = processComputService.ComputeMinimum(excel, mergeSheets, allot.ID); //var minimumBaiscnorm = processComputService.ComputeMinimum(excel, mergeSheets, allot.ID);
//计算科室业绩(含保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)保底绩效 ////计算科室业绩(含保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)保底绩效
logManageService.WriteMsg("计算保底绩效参考标准值", "计算科室业绩", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("计算保底绩效参考标准值", "计算科室业绩", 1, allot.ID, "ReceiveMessage", true);
var sheet = processComputService.Compute(excel, mergeSheets, minimumBaiscnorm, true); //var sheet = processComputService.Compute(excel, mergeSheets, minimumBaiscnorm, true);
//计算科室自定义保底绩效范围 ////计算科室自定义保底绩效范围
logManageService.WriteMsg("计算保底绩效参考标准值", "正在计算科室自定义保底绩效范围", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("计算保底绩效参考标准值", "正在计算科室自定义保底绩效范围", 1, allot.ID, "ReceiveMessage", true);
processComputService.ComputeCustomMinimum(excel, mergeSheets, minimumBaiscnorm, allot.ID); //processComputService.ComputeCustomMinimum(excel, mergeSheets, minimumBaiscnorm, allot.ID);
//计算各人群人均保底绩效 ////计算各人群人均保底绩效
logManageService.WriteMsg("计算保底绩效参考标准值", "正在生成保底绩效行政工勤人均绩效", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("计算保底绩效参考标准值", "正在生成保底绩效行政工勤人均绩效", 1, allot.ID, "ReceiveMessage", true);
var minimumBaiscnorm2 = resultComputeService.Compute(allot, excel, sheet, true); //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.行政工勤));
minimum.PositionName = EnumHelper.GetDescription(MinimumType.保底工勤); // minimum.PositionName = EnumHelper.GetDescription(MinimumType.保底工勤);
minimumBaiscnorm.Add(minimum); // minimumBaiscnorm.Add(minimum);
} //}
////保存 保底绩效参考标准
//logManageService.WriteMsg("计算保底绩效参考标准值", "保存保底绩效参考标准", 1, allot.ID, "ReceiveMessage", true);
//perforResbaiscnormRepository.AddRange(minimumBaiscnorm.ToArray());
//科室奖罚汇总
logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
var accountExtras = processComputService.GetAccountExtra(excel);
//保存 保底绩效参考标准 ////科室药占比考核
logManageService.WriteMsg("计算保底绩效参考标准值", "保存保底绩效参考标准", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
perforResbaiscnormRepository.AddRange(minimumBaiscnorm.ToArray()); //var accountExtras = processComputService.GetAccountExtra(excel);
////科室材料考核
//logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
//var accountExtras = processComputService.GetAccountExtra(excel);
//重新计算科室业绩(含所有提供保底金额) //重新计算科室业绩(含所有提供保底金额)
logManageService.WriteMsg("正在生成绩效", "重新计算科室业绩,包含所有保底金额计算科室业绩", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "计算科室业绩分", 1, allot.ID, "ReceiveMessage", true);
var sheetLast = processComputService.Compute(excel, mergeSheets, minimumBaiscnorm); var sheetLast = processComputService.Compute(excel, mergeSheets, accountExtras);
//保存计算过程数据 //保存计算过程数据
logManageService.WriteMsg("正在生成绩效", "保存科室业绩结果及计算过程中产生的数据", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "保存科室业绩结果及计算过程中产生的数据", 1, allot.ID, "ReceiveMessage", true);
processComputService.Save(sheetLast, allot.ID); processComputService.Save(sheetLast, allot.ID);
//业务中层行政中高层医院奖罚
logManageService.WriteMsg("正在生成绩效", "业务中层行政中高层医院奖罚", 1, allot.ID, "ReceiveMessage", true);
var employeeExtra = processComputService.GetEmployeeExtra(excel);
// 计算最总数据 // 计算最总数据
logManageService.WriteMsg("正在生成绩效", "计算最终绩效数据", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "计算最终绩效数据", 1, allot.ID, "ReceiveMessage", true);
var baiscnormList = resultComputeService.Compute(allot, excel, sheetLast); var baiscnormList = resultComputeService.Compute(allot, excel, sheetLast, employeeExtra);
// 计算特殊科室
logManageService.WriteMsg("正在生成绩效", "计算最终特殊科室绩效数据", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "计算最终特殊科室绩效数据", 1, allot.ID, "ReceiveMessage", true);
resultComputeService.SpecialUnitCompute(excel, allot, baiscnormList); resultComputeService.SpecialUnitCompute(excel, allot, sheetLast, baiscnormList, accountExtras, employeeExtra);
logManageService.WriteMsg("正在生成绩效", "保存最终特殊科室绩效数据", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "保存最终特殊科室绩效数据", 1, allot.ID, "ReceiveMessage", true);
//保存 绩效人均参考标准 //保存 绩效人均参考标准
...@@ -376,7 +394,7 @@ public void Generate(per_allot allot, string mail) ...@@ -376,7 +394,7 @@ public void Generate(per_allot allot, string mail)
} }
catch (Exception ex) catch (Exception ex)
{ {
logManageService.WriteMsg("绩效生成失败", "程序异常,请重新尝试。", 4, allot.ID, "ReceiveMessage"); logManageService.WriteMsg("绩效生成失败", ex.Message, 4, allot.ID, "ReceiveMessage");
logdbug.Add(allot.ID, "绩效生成失败", ex.ToString(), 4, 1); logdbug.Add(allot.ID, "绩效生成失败", ex.ToString(), 4, 1);
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateFail, EnumHelper.GetDescription(AllotStates.GenerateFail)); UpdateAllotStates(allot.ID, (int)AllotStates.GenerateFail, EnumHelper.GetDescription(AllotStates.GenerateFail));
//SendEmail(allot, mail, 2, time); //SendEmail(allot, mail, 2, time);
......
...@@ -347,10 +347,12 @@ public List<TitleValue> Department(AssessRequest request) ...@@ -347,10 +347,12 @@ public List<TitleValue> Department(AssessRequest request)
var result = new List<TitleValue>(); var result = new List<TitleValue>();
//取到该家医院下所有科室 //取到该家医院下所有科室
var idList = perforPerallotRepository.GetEntities(t => t.HospitalId == allot.HospitalId).Select(s => s.ID).ToList(); var idList = perforPerallotRepository.GetEntities(t => t.HospitalId == allot.HospitalId).Select(s => s.ID).ToList();
var department = perforImaccountbasicRepository.GetEntities(t => t.Department != "" && idList.Contains(t.AllotID.Value))?.Select(t => t.Department).Distinct().ToList(); //var department = perforImaccountbasicRepository.GetEntities(t => t.Department != "" && idList.Contains(t.AllotID.Value))?.Select(t => t.Department).Distinct().ToList();
//if (department != null && department.Count > 0)
//{
var department = perforImaccountbasicRepository.GetEntities(t => t.DoctorAccountingUnit != "" && idList.Contains(t.AllotID.Value))?.Select(t => t.DoctorAccountingUnit).Distinct().ToList();
if (department != null && department.Count > 0) if (department != null && department.Count > 0)
{ {
//自己选的 //自己选的
var _checked = perforAsdataRepository.GetEntities(t => t.AssessID == request.AssessID)?.Select(t => t.Department).ToList(); var _checked = perforAsdataRepository.GetEntities(t => t.AssessID == request.AssessID)?.Select(t => t.Department).ToList();
if (_checked != null && _checked.Count > 0) if (_checked != null && _checked.Count > 0)
......
...@@ -569,7 +569,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId) ...@@ -569,7 +569,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
int groupbasis = 1; int groupbasis = 1;
string single = ""; string single = "";
var sheetType = new List<int> { (int)SheetType.Income, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload, (int)SheetType.AccountAssess }; var sheetType = new List<int> { (int)SheetType.Income, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload, (int)SheetType.AccountExtra };
foreach (var stype in sheetType) foreach (var stype in sheetType)
{ {
if (type == 3 && stype == (int)SheetType.Workload) type = 1; if (type == 3 && stype == (int)SheetType.Workload) type = 1;
...@@ -597,7 +597,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId) ...@@ -597,7 +597,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
sheettype = 3; sheettype = 3;
amount = doctor.WorkloadFee ?? 0m; amount = doctor.WorkloadFee ?? 0m;
} }
else if (sheet.SheetType == (int)SheetType.AccountAssess) else if (sheet.SheetType == (int)SheetType.AccountExtra)
{ {
sheettype = 5; sheettype = 5;
amount = sheetData.Sum(t => t.CellValue ?? 0m); amount = sheetData.Sum(t => t.CellValue ?? 0m);
...@@ -762,7 +762,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second) ...@@ -762,7 +762,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
{ {
UnitType = second.UnitType, UnitType = second.UnitType,
AccountingUnit = second.Department, AccountingUnit = second.Department,
Department = second.Department, //Department = second.Department,
ScoringAverage = special.First().ScoringAverage.Value, ScoringAverage = special.First().ScoringAverage.Value,
OtherPerfor1 = special.First().OtherPerfor.Value, OtherPerfor1 = special.First().OtherPerfor.Value,
AdjustFactor = special.First().Adjust.Value, AdjustFactor = special.First().Adjust.Value,
...@@ -772,7 +772,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second) ...@@ -772,7 +772,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
PerforFee = special.First().GiveFee, PerforFee = special.First().GiveFee,
PerforTotal = special.First().ResultsTotalFee, PerforTotal = special.First().ResultsTotalFee,
Income = special.First().ResultsTotalFee, Income = special.First().ResultsTotalFee,
Extra = special.First().Punishment.Value, //Extra = special.First().Punishment.Value,
}, },
Detail = new List<DetailDtos>(), Detail = new List<DetailDtos>(),
}; };
......
...@@ -26,6 +26,7 @@ public class EmployeeService : IAutoInjection ...@@ -26,6 +26,7 @@ public class EmployeeService : IAutoInjection
private PerforUserhospitalRepository perforUserhospitalRepository; private PerforUserhospitalRepository perforUserhospitalRepository;
private PerforPerallotRepository perallotRepository; private PerforPerallotRepository perallotRepository;
private PerforPerapramountRepository perapramountRepository; private PerforPerapramountRepository perapramountRepository;
private PerforImemployeelogisticsRepository perforImemployeelogisticsRepository;
private ILogger<EmployeeService> logger; private ILogger<EmployeeService> logger;
public EmployeeService(PerforImemployeeRepository perforImemployeeRepository, public EmployeeService(PerforImemployeeRepository perforImemployeeRepository,
...@@ -35,6 +36,7 @@ public class EmployeeService : IAutoInjection ...@@ -35,6 +36,7 @@ public class EmployeeService : IAutoInjection
PerforUserhospitalRepository perforUserhospitalRepository, PerforUserhospitalRepository perforUserhospitalRepository,
PerforPerallotRepository perallotRepository, PerforPerallotRepository perallotRepository,
PerforPerapramountRepository perapramountRepository, PerforPerapramountRepository perapramountRepository,
PerforImemployeelogisticsRepository perforImemployeelogisticsRepository,
ILogger<EmployeeService> logger) ILogger<EmployeeService> logger)
{ {
this.perforImemployeeRepository = perforImemployeeRepository; this.perforImemployeeRepository = perforImemployeeRepository;
...@@ -44,6 +46,7 @@ public class EmployeeService : IAutoInjection ...@@ -44,6 +46,7 @@ public class EmployeeService : IAutoInjection
this.perforUserhospitalRepository = perforUserhospitalRepository; this.perforUserhospitalRepository = perforUserhospitalRepository;
this.perallotRepository = perallotRepository; this.perallotRepository = perallotRepository;
this.perapramountRepository = perapramountRepository; this.perapramountRepository = perapramountRepository;
this.perforImemployeelogisticsRepository = perforImemployeelogisticsRepository;
this.logger = logger; this.logger = logger;
} }
...@@ -257,6 +260,103 @@ public bool DeleteClinic(im_employee_clinic request) ...@@ -257,6 +260,103 @@ public bool DeleteClinic(im_employee_clinic request)
#endregion #endregion
#region 行政后勤
/// <summary>
///获取临床人员列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public List<im_employee_logistics> GetEmployeeLogisticsList(int? allotId, int userId)
{
if (allotId == null || allotId == 0)
{
var userHospital = perforUserhospitalRepository.GetEntity(t => t.UserID == userId);
if (userHospital == null)
throw new PerformanceException("用户未绑定医院!");
var allotList = perallotRepository.GetEntities(t => t.HospitalId == userHospital.HospitalID
&& new List<int> { (int)AllotStates.Archive, (int)AllotStates.GenerateSucceed }.Contains(t.States));
if (allotList != null && allotList.Any())
{
allotId = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).First().ID;
}
}
var employee = perforImemployeelogisticsRepository.GetEntities(t => t.AllotID == allotId);
return employee?.OrderBy(t => t.RowNumber).ToList();
}
/// <summary>
/// 新增临床人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public im_employee_logistics InsertLogistics(im_employee_logistics request)
{
var allot = perforPerallotRepository.GetEntity(t => t.ID == request.AllotID);
if (allot == null)
throw new PerformanceException("绩效方案不存在");
var sheet = perforPersheetRepository.GetEntity(t => t.AllotID == request.AllotID && t.SheetType == (int)SheetType.LogisticsEmployee);
if (sheet == null)
{
sheet = new per_sheet { AllotID = allot.ID, SheetName = "临床人员名单", SheetType = (int)SheetType.Employee, Source = 1 };
perforPersheetRepository.Add(sheet);
}
request.SheetID = sheet.ID;
perforImemployeelogisticsRepository.Add(request);
return request;
}
/// <summary>
/// 修改临床人员信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public im_employee_logistics UpdateLogistics(im_employee_logistics request)
{
var employee = perforImemployeelogisticsRepository.GetEntity(t => t.ID == request.ID);
if (employee == null)
throw new PerformanceException("该人员不存在");
employee.AccountingUnit = request.AccountingUnit;
employee.DoctorName = request.DoctorName;
employee.AccountType = request.AccountType;
employee.Department = request.Department;
employee.FitPeople = request.FitPeople;
employee.JobTitle = request.JobTitle;
employee.PostCoefficient = request.PostCoefficient;
//employee.WorkTime = ConvertHelper.To<DateTime?>(request.WorkTime);
employee.ScoreAverageRate = request.ScoreAverageRate;
employee.Attendance = request.Attendance;
//employee.PeopleNumber = request.PeopleNumber;
//employee.Workload = request.Workload;
employee.OtherPerfor = request.OtherPerfor;
//employee.Punishment = request.Punishment;
//employee.Adjust = request.Adjust;
//employee.Grant = request.Grant;
//修改人员信息
perforImemployeelogisticsRepository.Update(employee);
return employee;
}
/// <summary>
/// 删除临床人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public bool DeleteLogistics(im_employee_clinic request)
{
var employee = perforImemployeelogisticsRepository.GetEntity(t => t.ID == request.ID);
if (null == employee)
throw new PerformanceException("该人员不存在");
return perforImemployeelogisticsRepository.Remove(employee);
}
#endregion
/// <summary> /// <summary>
/// 人事科修改后提交状态 /// 人事科修改后提交状态
/// </summary> /// </summary>
......
...@@ -177,12 +177,12 @@ private bool EditAccountBasic(int userId, OriginalRequest request) ...@@ -177,12 +177,12 @@ private bool EditAccountBasic(int userId, OriginalRequest request)
{ {
{ "核算单元类型", nameof(im_accountbasic.UnitType) }, { "核算单元类型", nameof(im_accountbasic.UnitType) },
{ "核算单元", nameof(im_accountbasic.DoctorAccountingUnit) }, { "核算单元", nameof(im_accountbasic.DoctorAccountingUnit) },
{ "科室名称", nameof(im_accountbasic.Department) }, //{ "科室名称", nameof(im_accountbasic.Department) },
{ "效率绩效人数", nameof(im_accountbasic.PermanentStaff) }, { "效率绩效人数", nameof(im_accountbasic.PermanentStaff) },
{ "科主任/护士长人数", nameof(im_accountbasic.DoctorDirectorNumber) }, { "科主任/护士长人数", nameof(im_accountbasic.DoctorDirectorNumber) },
{ "核算单元人员数量", nameof(im_accountbasic.DoctorNumber) }, { "核算单元人员数量", nameof(im_accountbasic.DoctorNumber) },
{ "预算比例", nameof(im_accountbasic.DoctorBasicFactor) }, { "预算比例", nameof(im_accountbasic.DoctorBasicFactor) },
{ "倾斜系数", nameof(im_accountbasic.DoctorSlopeFactor) }, //{ "倾斜系数", nameof(im_accountbasic.DoctorSlopeFactor) },
{ "工作量倾斜系数", nameof(im_accountbasic.WorkSlopeFactor) }, { "工作量倾斜系数", nameof(im_accountbasic.WorkSlopeFactor) },
{ "保底绩效参考标准", nameof(im_accountbasic.MinimumReference) }, { "保底绩效参考标准", nameof(im_accountbasic.MinimumReference) },
{ "保底绩效系数", nameof(im_accountbasic.MinimumFactor) }, { "保底绩效系数", nameof(im_accountbasic.MinimumFactor) },
...@@ -198,8 +198,7 @@ private bool EditAccountBasic(int userId, OriginalRequest request) ...@@ -198,8 +198,7 @@ private bool EditAccountBasic(int userId, OriginalRequest request)
if (imdata == null || request.Cell == null || !accdict.ContainsKey(request.Cell.FieldName)) if (imdata == null || request.Cell == null || !accdict.ContainsKey(request.Cell.FieldName))
return false; return false;
var basic = imaccountbasicRepository.GetEntity(t => t.SheetID == request.SheetId && t.Department == imdata.Department var basic = imaccountbasicRepository.GetEntity(t => t.SheetID == request.SheetId && t.DoctorAccountingUnit == imdata.AccountingUnit && t.UnitType == imdata.UnitType);
&& t.DoctorAccountingUnit == imdata.AccountingUnit && t.UnitType == imdata.UnitType);
if (basic == null) return false; if (basic == null) return false;
if (request.Cell.FieldName == "核算单元类型") if (request.Cell.FieldName == "核算单元类型")
......
...@@ -279,7 +279,7 @@ public class ComputeDirector : IAutoInjection ...@@ -279,7 +279,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, bool isMinimum) public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerSheet> accountSheet, per_allot allot, IEnumerable<EmpolyeeTotal> employeeExtra)
{ {
var basicRuleList = new[] var basicRuleList = new[]
{ {
...@@ -355,7 +355,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -355,7 +355,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
if (basicRule == null) continue; if (basicRule == null) continue;
var avg = (resAccount.ManagerNumber + resAccount.Number) == 0 ? 0 : resAccount.PerforTotal / (resAccount.ManagerNumber + resAccount.Number); var avg = (resAccount.ManagerNumber + resAccount.Number) == 0 ? 0 : resAccount.PerforTotal / (resAccount.ManagerNumber + resAccount.Number);
var effAvg = resAccount.PermanentStaff == 0 ? 0 : resAccount.PerforTotal / resAccount.PermanentStaff; var effAvg = empolyee.PermanentStaff == 0 ? 0 : resAccount.PerforTotal / empolyee.PermanentStaff;
//var efficiency = avg * (empolyee.Efficiency ?? 1); //var efficiency = avg * (empolyee.Efficiency ?? 1);
var scale = resAccount.PerforTotal * (empolyee.Scale ?? 1); var scale = resAccount.PerforTotal * (empolyee.Scale ?? 1);
...@@ -371,8 +371,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -371,8 +371,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
JobNumber = empolyee.JobNumber, JobNumber = empolyee.JobNumber,
ScoreAverageRate = empolyee.ScoreAverageRate, ScoreAverageRate = empolyee.ScoreAverageRate,
Punishment = empolyee.Punishment, //Punishment = empolyee.Punishment,
OtherPerfor = empolyee.OtherPerfor, //OtherPerfor = empolyee.OtherPerfor,
Number = resAccount.ManagerNumber + resAccount.Number, Number = resAccount.ManagerNumber + resAccount.Number,
PerforTotal = resAccount.PerforTotal, PerforTotal = resAccount.PerforTotal,
...@@ -384,16 +384,21 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -384,16 +384,21 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
Grant = isBudget ? grant : empolyee.Management, Grant = isBudget ? grant : empolyee.Management,
ManagerNumber = resAccount.ManagerNumber, ManagerNumber = resAccount.ManagerNumber,
MedicalNumber = resAccount.Number, MedicalNumber = resAccount.Number,
PermanentStaff = resAccount.PermanentStaff, PermanentStaff = empolyee.PermanentStaff,
Attendance = empolyee.Attendance Attendance = empolyee.Attendance
}; };
var extra = employeeExtra.Where(w => !string.IsNullOrEmpty(w.AccountingUnit) && !string.IsNullOrEmpty(w.UnitType)
&& (!string.IsNullOrEmpty(w.EmployeeName) || !string.IsNullOrEmpty(w.JobNumber)))
.FirstOrDefault(w => w.AccountingUnit == empolyee.AccountingUnit && w.UnitType == empolyee.UnitType
&& w.JobNumber == empolyee.JobNumber && w.EmployeeName == empolyee.DoctorName)?.TotelValue;
//应发管理绩效 //应发管理绩效
compute.ShouldGiveFee = Math.Round((compute.Efficiency + compute.Scale) * (compute.Grant ?? 0) ?? 0); compute.ShouldGiveFee = Math.Round((compute.Efficiency + compute.Scale) * (compute.Grant ?? 0) ?? 0);
//绩效合计 //绩效合计
compute.PerforSumFee = Math.Round((compute.Avg * (empolyee.Basics ?? 0)) + compute.ShouldGiveFee ?? 0); compute.PerforSumFee = Math.Round((compute.Avg * (empolyee.Basics ?? 0)) + compute.ShouldGiveFee ?? 0);
//应发绩效 //应发绩效
//compute.GiveFee = compute.PerforSumFee; //compute.GiveFee = compute.PerforSumFee;
compute.GiveFee = Math.Round(compute.PerforSumFee * compute.ScoreAverageRate * (compute.Attendance ?? 0) + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0) ?? 0); compute.GiveFee = Math.Round(compute.PerforSumFee * compute.ScoreAverageRate * (compute.Attendance ?? 0) + (extra ?? 0) ?? 0);
//实发绩效 //实发绩效
//compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate * (compute.Attendance ?? 0) + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m); //compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate * (compute.Attendance ?? 0) + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m);
compute.RealGiveFee = Math.Round(compute.GiveFee * (compute.Adjust ?? 1m) ?? 0); compute.RealGiveFee = Math.Round(compute.GiveFee * (compute.Adjust ?? 1m) ?? 0);
...@@ -407,28 +412,39 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -407,28 +412,39 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
} }
/// <summary> /// <summary>
/// 院领导、业务中层、工勤人员 计算 /// 行政中高层 行政后勤
/// </summary> /// </summary>
/// <param name="empolyeeList"></param> /// <param name="empolyeeList"></param>
/// <param name="baiscnormList"></param> /// <param name="baiscnormList"></param>
/// <returns></returns> /// <returns></returns>
public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot allot, List<res_baiscnorm> baiscnormList) public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot allot, List<res_baiscnorm> baiscnormList, IEnumerable<EmpolyeeTotal> employeeExtra)
{ {
//年资系数 ////年资系数
var workyearList = perforCofworkyearRepository.GetEntities(t => t.AllotID == allot.ID); //var workyearList = perforCofworkyearRepository.GetEntities(t => t.AllotID == allot.ID);
List<ComputeResult> computeList = new List<ComputeResult>(); List<ComputeResult> computeList = new List<ComputeResult>();
List<string> involve = new List<string> { AccountUnitType.行政高层.ToString(), AccountUnitType.行政中层.ToString(), AccountUnitType.行政工勤.ToString() }; List<string> involves = new List<string>
var needCompute = empolyeeList.Where(t => involve.Contains(t.AccountType)); {
AccountUnitType.行政高层.ToString(), AccountUnitType.行政中层.ToString(), AccountUnitType.行政工勤.ToString()
};
if (!needCompute.Any()) return computeList; foreach (var involve in involves)
{
var needCompute = empolyeeList.Where(t => involve == t.AccountType);
if (!needCompute.Any()) continue;
var isBudget = budgetService.GetAdjustAndGrant(allot, out decimal adjust, out decimal grant); var isBudget = budgetService.GetAdjustAndGrant(allot, out decimal adjust, out decimal grant);
var perforTypeArray = EnumHelper.GetItems<PerforType>(); var perforTypeArray = EnumHelper.GetItems<PerforType>();
foreach (var item in needCompute) foreach (var item in needCompute)
{ {
// 奖罚汇总
var extra = employeeExtra.Where(w => !string.IsNullOrEmpty(w.AccountingUnit) && !string.IsNullOrEmpty(w.UnitType) && (!string.IsNullOrEmpty(w.EmployeeName) || !string.IsNullOrEmpty(w.JobNumber)))
.FirstOrDefault(w => w.AccountingUnit == item.AccountingUnit && w.UnitType == item.UnitType && w.JobNumber == item.JobNumber && w.EmployeeName == item.DoctorName)
?.TotelValue;
var itemAdjust = isBudget ? adjust : item.Adjust; var itemAdjust = isBudget ? adjust : item.Adjust;
var compute = new ComputeResult var compute = new ComputeResult
{ {
...@@ -437,11 +453,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot ...@@ -437,11 +453,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
EmployeeName = item.DoctorName, EmployeeName = item.DoctorName,
FitPeople = item.FitPeople, FitPeople = item.FitPeople,
Grant = isBudget ? grant : (item.Management ?? 1), Grant = isBudget ? grant : (item.Management ?? 1),
WorkTime = item.WorkTime, //WorkTime = item.WorkTime,
PostCoefficient = item.PostCoefficient, PostCoefficient = item.PostCoefficient,
Attendance = item.Attendance, Attendance = item.Attendance,
ScoreAverageRate = item.ScoreAverageRate, ScoreAverageRate = item.ScoreAverageRate,
Punishment = item.Punishment, Punishment = extra ?? 0,
OtherPerfor = item.OtherPerfor, OtherPerfor = item.OtherPerfor,
JobTitle = item.JobTitle, JobTitle = item.JobTitle,
JobNumber = item.JobNumber, JobNumber = item.JobNumber,
...@@ -449,30 +465,30 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot ...@@ -449,30 +465,30 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
//Workload = item.Workload //Workload = item.Workload
}; };
decimal? baiscnorm = 1; decimal? baiscnorm = 1;
var perforTypeItem = perforTypeArray.FirstOrDefault(t => t.Description == item.FitPeople); var perforTypeItem = perforTypeArray.FirstOrDefault(t => t.Description == item.FitPeople);
if (perforTypeItem != null) if (perforTypeItem != null)
{ {
var perforType = (PerforType)perforTypeItem.Value; var perforType = (PerforType)perforTypeItem.Value;
baiscnorm = item.FitPeopleValue ?? baiscNormService.GetBaiscNorm(baiscnormList, perforType); baiscnorm = item.FitPeopleValue ?? baiscNormService.GetBaiscNorm(baiscnormList, perforType);
//年资系数
if (item.FitPeople == AccountUnitType.行政工勤.ToString() && item.WorkTime.HasValue && item.WorkTime.Value > new DateTime(1970, 1, 1))
{
var years = ((DateTime.Now.Year - item.WorkTime.Value.Year) * 12 + (DateTime.Now.Month - item.WorkTime.Value.Month)) / 12.0m;
var value = workyearList.FirstOrDefault(t => t.MinRange < years && years <= t.MaxRange)?.Value;
compute.WorkYear = value;
}
} }
//添加参数计算 //添加参数计算
compute.BaiscNormValue = baiscnorm * (item.FitPeopleRatio ?? 0); compute.BaiscNormValue = baiscnorm * (item.FitPeopleRatio ?? 0);
//应发绩效 //应发绩效
compute.GiveFee = Math.Round((compute.BaiscNormValue * compute.PostCoefficient * (compute.WorkYear ?? 1) * compute.Attendance * compute.ScoreAverageRate compute.GiveFee = compute.BaiscNormValue * compute.PostCoefficient * compute.Attendance + compute.Punishment;
+ (compute.OtherPerfor ?? 0) + (compute.Punishment ?? 0)) ?? 0);
// 行政中高层 不需要其他绩效 行政工勤 不需要考核得分率 区分开计算
if (AccountUnitType.行政工勤.ToString() == involve)
compute.GiveFee = Math.Round(compute.GiveFee + (compute.OtherPerfor ?? 0) ?? 0);
else
compute.GiveFee = Math.Round((compute.GiveFee * compute.ScoreAverageRate) ?? 0);
//实发绩效 //实发绩效
compute.RealGiveFee = Math.Round((compute.GiveFee * (itemAdjust ?? 1)) ?? 0); compute.RealGiveFee = Math.Round((compute.GiveFee * (itemAdjust ?? 1)) ?? 0);
computeList.Add(compute); computeList.Add(compute);
} }
}
return computeList; return computeList;
} }
......
using NPOI.HSSF.UserModel; using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel; using NPOI.SS.UserModel;
using Performance.DtoModels;
using Performance.Infrastructure; using Performance.Infrastructure;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace Performance.Services namespace Performance.Services
{ {
public class NopiSevice public static class NopiSevice
{ {
public static string GetCellStringValue(ICell cell) public static string GetCellStringValue(ICell cell)
{ {
...@@ -57,6 +59,43 @@ public static string GetCellStringValue(ICell cell) ...@@ -57,6 +59,43 @@ public static string GetCellStringValue(ICell cell)
return null; return null;
} }
public static string GetValue(this ICell cell)
{
if (cell != null)
{
try
{
switch (cell.CellType)
{
case CellType.Numeric:
return cell?.NumericCellValue.ToString();
case CellType.String:
return cell?.StringCellValue.ToString();
case CellType.Formula:
return cell?.NumericCellValue.ToString();
case CellType.Boolean:
return cell?.BooleanCellValue.ToString();
case CellType.Unknown:
case CellType.Blank:
case CellType.Error:
return string.Empty;
}
}
catch (Exception ex)
{
//throw ex;
}
}
return null;
}
public static bool TryGetPoint(List<PerHeader> headers, string title, out int point)
{
var x = headers.FirstOrDefault(p => p.CellValue == title)?.PointCell;
point = x.HasValue ? x.Value : 0;
return x.HasValue;
}
public static DateTime? GetCellDatetimeValue(ICell cell) public static DateTime? GetCellDatetimeValue(ICell cell)
{ {
if (cell != null) if (cell != null)
......
...@@ -53,8 +53,24 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa ...@@ -53,8 +53,24 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa
case SheetType.AccountBasicSpecial: case SheetType.AccountBasicSpecial:
dataread = new PerSheetDataReadDeptAccountingSpecial(); dataread = new PerSheetDataReadDeptAccountingSpecial();
break; break;
case SheetType.AccountAssess: case SheetType.AccountExtra:
dataread = new PerSheetDataReadAccountAssess(); dataread = new PerSheetDataReadAccountExtra();
break;
case SheetType.LogisticsEmployee:
dataread = new PerSheetDataReadLogisticsEmployee(); // 行政后勤
break;
case SheetType.PersonExtra:
//dataread = new PerSheetDataReadPersonExtra(); // 业务中层行政中高层医院奖罚
dataread = new PerSheetDataReadAccountExtra();
break;
case SheetType.AccountDrugAssess:
dataread = new PerSheetDataReadAccountExtra();
//dataread = new PerSheetDataReadAccountDrugAssess(); // 科室药占比考核
break;
case SheetType.AccountMaterialsAssess:
dataread = new PerSheetDataReadAccountExtra();
//dataread = new PerSheetDataReadAccountMaterialsAssess(); // 科室材料考核
break; break;
} }
return dataread; return dataread;
......
...@@ -78,10 +78,12 @@ public PerSheet Sheet(ISheet sheet, bool isnew) ...@@ -78,10 +78,12 @@ public PerSheet Sheet(ISheet sheet, bool isnew)
/// <returns></returns> /// <returns></returns>
public SheetType GetSheetType(string sheetName) public SheetType GetSheetType(string sheetName)
{ {
if (sheetName.StartsWith("行政人员名单")) if (sheetName.StartsWith("行政中高层"))
return SheetType.Employee; return SheetType.Employee;
else if (sheetName.StartsWith("业务中层")) else if (sheetName.StartsWith("业务中层"))
return SheetType.ClinicEmployee; return SheetType.ClinicEmployee;
else if (sheetName.StartsWith("行政后勤"))
return SheetType.LogisticsEmployee;
else if (sheetName.StartsWith("1.0")) else if (sheetName.StartsWith("1.0"))
return SheetType.OtherIncome; return SheetType.OtherIncome;
else if (sheetName.StartsWith("1.")) else if (sheetName.StartsWith("1."))
...@@ -95,7 +97,13 @@ public SheetType GetSheetType(string sheetName) ...@@ -95,7 +97,13 @@ public SheetType GetSheetType(string sheetName)
else if (sheetName.StartsWith("4.2")) else if (sheetName.StartsWith("4.2"))
return SheetType.SpecialUnit; return SheetType.SpecialUnit;
else if (sheetName.StartsWith("5.1")) else if (sheetName.StartsWith("5.1"))
return SheetType.AccountAssess; return SheetType.AccountExtra;
else if (sheetName.StartsWith("5.2"))
return SheetType.PersonExtra;
else if (sheetName.StartsWith("5.3"))
return SheetType.AccountDrugAssess;
else if (sheetName.StartsWith("5.4"))
return SheetType.AccountMaterialsAssess;
return SheetType.Unidentifiable; return SheetType.Unidentifiable;
} }
} }
......
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
namespace Performance.Services namespace Performance.Services
{ {
public class PerSheetDataReadAccountAssess : IPerSheetDataRead /// <summary>
/// 科室奖罚
/// </summary>
public class PerSheetDataReadAccountExtra : IPerSheetDataRead
{ {
public PerSheetPoint Point => new PerSheetPoint public PerSheetPoint Point => new PerSheetPoint
{ {
......
...@@ -30,14 +30,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -30,14 +30,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
"医生姓名", "医生姓名",
"职务分类", "职务分类",
"基础绩效系数", "基础绩效系数",
"岗位系数", //"岗位系数",
"效率绩效人数",
"效率绩效系数", "效率绩效系数",
"规模绩效系数", "规模绩效系数",
"管理绩效发放系数", "管理绩效发放系数",
"考核得分率", "考核得分率",
"出勤率", "出勤率",
"其他绩效", "其他管理绩效",
"医院奖罚", //"其他绩效",
//"医院奖罚",
"调节系数", "调节系数",
}; };
foreach (var item in headers) foreach (var item in headers)
...@@ -60,14 +62,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -60,14 +62,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
DoctorName = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医生姓名").PointCell)?.StringCellValue, DoctorName = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医生姓名").PointCell)?.StringCellValue,
JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职务分类").PointCell)?.StringCellValue, JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职务分类").PointCell)?.StringCellValue,
Basics = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "基础绩效系数").PointCell)?.NumericCellValue), Basics = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "基础绩效系数").PointCell)?.NumericCellValue),
PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "岗位系数").PointCell)?.NumericCellValue), //PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "岗位系数").PointCell)?.NumericCellValue),
PermanentStaff = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效人数").PointCell)?.NumericCellValue),
Efficiency = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数").PointCell)?.NumericCellValue), Efficiency = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数").PointCell)?.NumericCellValue),
Scale = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数").PointCell)?.NumericCellValue), Scale = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数").PointCell)?.NumericCellValue),
Management = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数").PointCell)?.NumericCellValue), Management = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数").PointCell)?.NumericCellValue),
ScoreAverageRate = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue), ScoreAverageRate = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue),
Attendance = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "出勤率").PointCell)?.NumericCellValue), Attendance = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "出勤率").PointCell)?.NumericCellValue),
OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue), //OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue),
Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue), //Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue),
OtheManagementPerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他管理绩效").PointCell)?.NumericCellValue),
Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue), Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue),
}; };
if (!string.IsNullOrEmpty(clinicEmployee.UnitType) && !string.IsNullOrEmpty(clinicEmployee.DoctorName)) if (!string.IsNullOrEmpty(clinicEmployee.UnitType) && !string.IsNullOrEmpty(clinicEmployee.DoctorName))
...@@ -76,5 +80,5 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -76,5 +80,5 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
return dataList; return dataList;
} }
} }
} }
...@@ -28,20 +28,20 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -28,20 +28,20 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
"核算单元类型", "核算单元类型",
"核算单元", "核算单元",
"科室名称", //"科室名称",
"效率绩效人数", //"效率绩效人数",
"科主任/护士长人数", "科主任/护士长人数",
"核算单元人员数量", "核算单元人员数量",
"预算比例", "预算比例",
"倾斜系数", //"倾斜系数",
"工作量倾斜系数", //"工作量倾斜系数",
"保底绩效参考标准", //"保底绩效参考标准",
"保底绩效系数", //"保底绩效系数",
"其他绩效1", //"其他绩效1",
"其他绩效2", //"其他绩效2",
"药占比奖罚", //"药占比奖罚",
"材料占比奖罚", //"材料占比奖罚",
"医院奖罚", //"医院奖罚",
"考核得分率", "考核得分率",
"调节系数", "调节系数",
}; };
...@@ -59,23 +59,23 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -59,23 +59,23 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
unifyUnit.RowNumber = r; unifyUnit.RowNumber = r;
unifyUnit.UnitType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元类型").PointCell)?.StringCellValue; unifyUnit.UnitType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元类型").PointCell)?.StringCellValue;
unifyUnit.AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)); unifyUnit.AccountingUnit = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell));
unifyUnit.Department = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室名称").PointCell)); //unifyUnit.Department = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室名称").PointCell));
unifyUnit.PermanentStaff = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效人数").PointCell)?.NumericCellValue); //unifyUnit.PermanentStaff = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效人数").PointCell)?.NumericCellValue);
unifyUnit.ManagerNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科主任/护士长人数").PointCell)?.NumericCellValue); unifyUnit.ManagerNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科主任/护士长人数").PointCell)?.NumericCellValue);
unifyUnit.Number = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元人员数量").PointCell)?.NumericCellValue); unifyUnit.Number = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元人员数量").PointCell)?.NumericCellValue);
unifyUnit.BasicFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "预算比例").PointCell)?.NumericCellValue); unifyUnit.BasicFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "预算比例").PointCell)?.NumericCellValue);
unifyUnit.SlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数").PointCell)?.NumericCellValue); //unifyUnit.SlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数").PointCell)?.NumericCellValue);
//unifyUnit.Scale = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数").PointCell)?.NumericCellValue); //unifyUnit.Scale = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数").PointCell)?.NumericCellValue);
//unifyUnit.Effic = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数").PointCell)?.NumericCellValue); //unifyUnit.Effic = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数").PointCell)?.NumericCellValue);
//unifyUnit.Grant = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数").PointCell)?.NumericCellValue);工作量倾斜系数 //unifyUnit.Grant = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数").PointCell)?.NumericCellValue);工作量倾斜系数
unifyUnit.WorkSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "工作量倾斜系数").PointCell)?.NumericCellValue); //unifyUnit.WorkSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "工作量倾斜系数").PointCell)?.NumericCellValue);
unifyUnit.MinimumReference = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效参考标准").PointCell)?.StringCellValue; //unifyUnit.MinimumReference = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效参考标准").PointCell)?.StringCellValue;
unifyUnit.MinimumFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效系数").PointCell)?.NumericCellValue); //unifyUnit.MinimumFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效系数").PointCell)?.NumericCellValue);
unifyUnit.OtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1").PointCell)?.NumericCellValue); //unifyUnit.OtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1").PointCell)?.NumericCellValue);
unifyUnit.OtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2").PointCell)?.NumericCellValue); //unifyUnit.OtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2").PointCell)?.NumericCellValue);
unifyUnit.MedicineExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "药占比奖罚").PointCell)?.NumericCellValue); //unifyUnit.MedicineExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "药占比奖罚").PointCell)?.NumericCellValue);
unifyUnit.MaterialsExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "材料占比奖罚").PointCell)?.NumericCellValue); //unifyUnit.MaterialsExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "材料占比奖罚").PointCell)?.NumericCellValue);
unifyUnit.Extra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue); //unifyUnit.Extra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue);
unifyUnit.ScoringAverage = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue); unifyUnit.ScoringAverage = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue);
unifyUnit.AdjustFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue); unifyUnit.AdjustFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
namespace Performance.Services namespace Performance.Services
{ {
/// <summary> /// <summary>
/// 人员读取 /// 行政中高层
/// </summary> /// </summary>
public class PerSheetDataReadEmployee : IPerSheetDataRead public class PerSheetDataReadEmployee : IPerSheetDataRead
{ {
...@@ -35,11 +35,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -35,11 +35,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
"绩效基数核算系数", "绩效基数核算系数",
"人员分类", "人员分类",
"岗位系数", "岗位系数",
"参加工作时间", //"参加工作时间",
"考核得分率", "考核得分率",
"出勤率", "出勤率",
"其他绩效", //"其他绩效",
"医院奖罚", //"医院奖罚",
"调节系数", "调节系数",
}; };
foreach (var item in headers) foreach (var item in headers)
...@@ -65,13 +65,13 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -65,13 +65,13 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
FitPeopleRatio = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算系数").PointCell)?.NumericCellValue), FitPeopleRatio = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算系数").PointCell)?.NumericCellValue),
AccountType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人员分类").PointCell)?.StringCellValue, AccountType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人员分类").PointCell)?.StringCellValue,
PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "岗位系数").PointCell)?.NumericCellValue), PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "岗位系数").PointCell)?.NumericCellValue),
WorkTime = NopiSevice.GetCellDatetimeValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "参加工作时间").PointCell)), //WorkTime = NopiSevice.GetCellDatetimeValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "参加工作时间").PointCell)),
ScoreAverageRate = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue), ScoreAverageRate = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue),
Attendance = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "出勤率").PointCell)?.NumericCellValue), Attendance = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "出勤率").PointCell)?.NumericCellValue),
//PeopleNumber = ConvertHelper.To<int?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元医生数").PointCell)?.ToString()), //PeopleNumber = ConvertHelper.To<int?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元医生数").PointCell)?.ToString()),
//Workload = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "工作量绩效").PointCell)?.ToString()), //Workload = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "工作量绩效").PointCell)?.ToString()),
OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue), //OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue),
Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue), //Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue),
Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue), Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue),
//Grant = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "发放系数").PointCell)?.ToString()), //Grant = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "发放系数").PointCell)?.ToString()),
}; };
......
using NPOI.SS.UserModel;
using Performance.DtoModels;
using Performance.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services
{
/// <summary>
/// 行政后勤
/// </summary>
public class PerSheetDataReadLogisticsEmployee : IPerSheetDataRead
{
public PerSheetPoint Point => new PerSheetPoint
{
HeaderFirstRowNum = 1,
HeaderLastRowNum = 1,
HeaderFirstCellNum = 0,
DataFirstRowNum = 2,
};
public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
List<IPerData> dataList = new List<IPerData>();
for (int r = Point.DataFirstRowNum.Value; r < sheet.LastRowNum + 1; r++)
{
var row = sheet.GetRow(r);
if (row == null) continue;
PerDataLogisticsEmployee employee = new PerDataLogisticsEmployee()
{
RowNumber = r,
};
int point = 0;
if (NopiSevice.TryGetPoint(perHeader, "人员分类", out point))
employee.AccountType = row.GetCell(point).GetValue();
if (NopiSevice.TryGetPoint(perHeader, "核算单元", out point))
employee.AccountingUnit = row.GetCell(point).GetValue();
if (NopiSevice.TryGetPoint(perHeader, "绩效基数核算参考对象", out point))
employee.FitPeople = row.GetCell(point).GetValue();
if (NopiSevice.TryGetPoint(perHeader, "绩效基础核算参考值", out point))
employee.FitPeopleValue = ConvertHelper.To<decimal?>(row.GetCell(point).GetValue());
if (NopiSevice.TryGetPoint(perHeader, "绩效基数核算系数", out point))
employee.FitPeopleRatio = ConvertHelper.To<decimal?>(row.GetCell(point).GetValue());
if (NopiSevice.TryGetPoint(perHeader, "人员工号", out point))
employee.JobNumber = row.GetCell(point).GetValue();
if (NopiSevice.TryGetPoint(perHeader, "人员姓名", out point))
employee.DoctorName = row.GetCell(point).GetValue();
if (NopiSevice.TryGetPoint(perHeader, "职务分类", out point))
employee.JobTitle = row.GetCell(point).GetValue();
if (NopiSevice.TryGetPoint(perHeader, "岗位系数", out point))
employee.PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(point).GetValue());
if (NopiSevice.TryGetPoint(perHeader, "出勤率", out point))
employee.Attendance = ConvertHelper.To<decimal?>(row.GetCell(point).GetValue());
if (NopiSevice.TryGetPoint(perHeader, "其他绩效", out point))
employee.OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(point).GetValue());
if (!string.IsNullOrEmpty(employee.AccountingUnit) && !string.IsNullOrEmpty(employee.FitPeople))
dataList.Add(employee);
}
return dataList;
}
}
}
...@@ -30,10 +30,10 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -30,10 +30,10 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
"量化指标绩效分值", "量化指标绩效分值",
"科室", "科室",
"人数", "人数",
"考核得分率", //"考核得分率",
"其他绩效", //"其他绩效",
"医院奖罚", //"医院奖罚",
"调节系数", //"调节系数",
}; };
foreach (var item in headers) foreach (var item in headers)
{ {
...@@ -73,10 +73,10 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -73,10 +73,10 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
specialUnit.AccountingUnit = accountingUnit; specialUnit.AccountingUnit = accountingUnit;
specialUnit.Department = accountingUnit; specialUnit.Department = accountingUnit;
specialUnit.Number = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人数").PointCell)?.NumericCellValue); specialUnit.Number = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人数").PointCell)?.NumericCellValue);
specialUnit.ScoringAverage = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue); //specialUnit.ScoringAverage = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue);
specialUnit.OtherPerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue); //specialUnit.OtherPerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue);
specialUnit.Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue); //specialUnit.Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue);
specialUnit.Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue); //specialUnit.Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue);
//} //}
if (!string.IsNullOrEmpty(specialUnit.QuantitativeIndicators) && specialUnit.QuantitativeIndicatorsValue != null) if (!string.IsNullOrEmpty(specialUnit.QuantitativeIndicators) && specialUnit.QuantitativeIndicatorsValue != null)
dataList.Add(specialUnit); dataList.Add(specialUnit);
......
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