重新计算绩效

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>
......
...@@ -393,9 +393,9 @@ ...@@ -393,9 +393,9 @@
岗位系数 岗位系数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.ComputeEmployee.WorkTime"> <member name="P:Performance.DtoModels.ComputeEmployee.PermanentStaff">
<summary> <summary>
参加工作时间 效率绩效人数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.ComputeEmployee.ScoreAverageRate"> <member name="P:Performance.DtoModels.ComputeEmployee.ScoreAverageRate">
...@@ -413,11 +413,6 @@ ...@@ -413,11 +413,6 @@
其他绩效 其他绩效
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.ComputeEmployee.Punishment">
<summary>
医院奖罚
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeEmployee.Adjust"> <member name="P:Performance.DtoModels.ComputeEmployee.Adjust">
<summary> <summary>
调节系数 调节系数
...@@ -520,7 +515,7 @@ ...@@ -520,7 +515,7 @@
</member> </member>
<member name="P:Performance.DtoModels.ComputeResult.Punishment"> <member name="P:Performance.DtoModels.ComputeResult.Punishment">
<summary> <summary>
医院奖罚(来自人员名单) 医院奖罚 来自5.2
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.ComputeResult.OtherPerfor"> <member name="P:Performance.DtoModels.ComputeResult.OtherPerfor">
...@@ -538,21 +533,11 @@ ...@@ -538,21 +533,11 @@
参考基数专用绩效合计 参考基数专用绩效合计
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.ComputeResult.WorkTime">
<summary>
参加工作时间(来自人员名单)
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeResult.BaiscNormValue"> <member name="P:Performance.DtoModels.ComputeResult.BaiscNormValue">
<summary> <summary>
绩效基础金额(计算) 绩效基础金额(计算)
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.ComputeResult.WorkYear">
<summary>
年资系数(来自人员名单)
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeResult.RealGiveFee"> <member name="P:Performance.DtoModels.ComputeResult.RealGiveFee">
<summary> <summary>
实发绩效 实发绩效
...@@ -595,7 +580,7 @@ ...@@ -595,7 +580,7 @@
<summary> 无法识别 </summary> <summary> 无法识别 </summary>
</member> </member>
<member name="F:Performance.DtoModels.SheetType.Employee"> <member name="F:Performance.DtoModels.SheetType.Employee">
<summary> 医院人员名单 </summary> <summary> 行政中高层 </summary>
</member> </member>
<member name="F:Performance.DtoModels.SheetType.Income"> <member name="F:Performance.DtoModels.SheetType.Income">
<summary> 收入 </summary> <summary> 收入 </summary>
...@@ -634,13 +619,25 @@ ...@@ -634,13 +619,25 @@
<summary> 临床科室护士绩效测算表 </summary> <summary> 临床科室护士绩效测算表 </summary>
</member> </member>
<member name="F:Performance.DtoModels.SheetType.ClinicEmployee"> <member name="F:Performance.DtoModels.SheetType.ClinicEmployee">
<summary> 临床人员名单 </summary> <summary> 业务中层 </summary>
</member> </member>
<member name="F:Performance.DtoModels.SheetType.AccountBasicSpecial"> <member name="F:Performance.DtoModels.SheetType.AccountBasicSpecial">
<summary> 特殊临床科室医护绩效测算基础 </summary> <summary> 特殊临床科室医护绩效测算基础 </summary>
</member> </member>
<member name="F:Performance.DtoModels.SheetType.AccountAssess"> <member name="F:Performance.DtoModels.SheetType.AccountExtra">
<summary> 临床科室医护绩效考核表 </summary> <summary> 科室绩效医院奖罚 </summary>
</member>
<member name="F:Performance.DtoModels.SheetType.PersonExtra">
<summary> 业务中层行政中高层医院奖罚 </summary>
</member>
<member name="F:Performance.DtoModels.SheetType.AccountDrugAssess">
<summary> 科室药占比考核 </summary>
</member>
<member name="F:Performance.DtoModels.SheetType.AccountMaterialsAssess">
<summary> 科室材料考核 </summary>
</member>
<member name="F:Performance.DtoModels.SheetType.LogisticsEmployee">
<summary> 行政后勤 </summary>
</member> </member>
<member name="T:Performance.DtoModels.AccountUnitType"> <member name="T:Performance.DtoModels.AccountUnitType">
<summary> <summary>
...@@ -690,6 +687,16 @@ ...@@ -690,6 +687,16 @@
列头类型名称 列头类型名称
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerData.EmployeeName">
<summary>
人员姓名
</summary>
</member>
<member name="P:Performance.DtoModels.PerData.JobNumber">
<summary>
人员工号
</summary>
</member>
<member name="P:Performance.DtoModels.PerData.Annotation"> <member name="P:Performance.DtoModels.PerData.Annotation">
<summary> <summary>
单元格注释 单元格注释
...@@ -760,16 +767,6 @@ ...@@ -760,16 +767,6 @@
核算单元 核算单元
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.Department">
<summary>
科室名称
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.PermanentStaff">
<summary>
定科人数
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.ManagerNumber"> <member name="P:Performance.DtoModels.PerDataAccountBaisc.ManagerNumber">
<summary> <summary>
科主任/护士长数量 科主任/护士长数量
...@@ -785,11 +782,6 @@ ...@@ -785,11 +782,6 @@
医生基础系数 医生基础系数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.SlopeFactor">
<summary>
倾斜系数
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.OtherPerfor1"> <member name="P:Performance.DtoModels.PerDataAccountBaisc.OtherPerfor1">
<summary> <summary>
其他绩效1 其他绩效1
...@@ -810,11 +802,6 @@ ...@@ -810,11 +802,6 @@
材料占比奖罚 材料占比奖罚
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.Extra">
<summary>
医院奖罚
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.ScoringAverage"> <member name="P:Performance.DtoModels.PerDataAccountBaisc.ScoringAverage">
<summary> <summary>
考核对分率 考核对分率
...@@ -840,31 +827,11 @@ ...@@ -840,31 +827,11 @@
发放系数 发放系数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.MinimumReference">
<summary>
保底绩效参考标准
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.MinimumFactor">
<summary>
保底绩效系数
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.WorkSlopeFactor">
<summary>
工作量倾斜系数
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.MedicineFactor"> <member name="P:Performance.DtoModels.PerDataAccountBaisc.MedicineFactor">
<summary> <summary>
药占比系数 药占比系数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.MinimumFee">
<summary>
保底绩效金额
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.Income"> <member name="P:Performance.DtoModels.PerDataAccountBaisc.Income">
<summary> <summary>
科室业绩 科室业绩
...@@ -930,9 +897,9 @@ ...@@ -930,9 +897,9 @@
基础绩效系数 基础绩效系数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataClinicEmployee.PostCoefficient"> <member name="P:Performance.DtoModels.PerDataClinicEmployee.PermanentStaff">
<summary> <summary>
岗位系 效率绩效人
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataClinicEmployee.Efficiency"> <member name="P:Performance.DtoModels.PerDataClinicEmployee.Efficiency">
...@@ -950,11 +917,6 @@ ...@@ -950,11 +917,6 @@
管理绩效发放系数 管理绩效发放系数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataClinicEmployee.WorkTime">
<summary>
参加工作时间
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataClinicEmployee.ScoreAverageRate"> <member name="P:Performance.DtoModels.PerDataClinicEmployee.ScoreAverageRate">
<summary> <summary>
考核得分率 考核得分率
...@@ -965,14 +927,9 @@ ...@@ -965,14 +927,9 @@
出勤率 出勤率
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataClinicEmployee.OthePerfor"> <member name="P:Performance.DtoModels.PerDataClinicEmployee.OtheManagementPerfor">
<summary>
其他绩效
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataClinicEmployee.Punishment">
<summary> <summary>
医院奖罚 其他管理绩效
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataClinicEmployee.Adjust"> <member name="P:Performance.DtoModels.PerDataClinicEmployee.Adjust">
...@@ -1035,11 +992,6 @@ ...@@ -1035,11 +992,6 @@
岗位系数 岗位系数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataEmployee.WorkTime">
<summary>
参加工作时间
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataEmployee.ScoreAverageRate"> <member name="P:Performance.DtoModels.PerDataEmployee.ScoreAverageRate">
<summary> <summary>
考核得分率 考核得分率
...@@ -1050,74 +1002,104 @@ ...@@ -1050,74 +1002,104 @@
出勤率 出勤率
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataEmployee.OthePerfor"> <member name="P:Performance.DtoModels.PerDataEmployee.Adjust">
<summary> <summary>
其他绩效 调节系数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataEmployee.Punishment"> <member name="P:Performance.DtoModels.PerDataEmployee.RowNumber">
<summary> <summary>
医院奖罚 行号
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataEmployee.Adjust"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.AccountingUnit">
<summary> <summary>
调节系数 核算单元
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataEmployee.RowNumber"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.FitPeople">
<summary> <summary>
行号 绩效基数核算参考对象
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.AccountingUnit"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.FitPeopleValue">
<summary> <summary>
核算单元 绩效基础核算参考值
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.Department"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.FitPeopleRatio">
<summary> <summary>
科室名称 绩效基数核算参考对象取值比例(如临床科室护士*95%)
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.Number"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.AccountType">
<summary> <summary>
人数 科室类别(例如 医技科室 临床科室 其他科室)
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.QuantitativeIndicators"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.JobNumber">
<summary> <summary>
量化指标 人员工号
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.Quantity"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.DoctorName">
<summary> <summary>
数量 姓名
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.QuantitativeIndicatorsValue"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.JobTitle">
<summary> <summary>
量化指标绩效分值 职务分类
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.ScoringAverage"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.PostCoefficient">
<summary> <summary>
考核得分率 岗位系数
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.OtherPerfor"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.Attendance">
<summary>
出勤率
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataLogisticsEmployee.OthePerfor">
<summary> <summary>
其他绩效 其他绩效
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.Punishment"> <member name="P:Performance.DtoModels.PerDataLogisticsEmployee.RowNumber">
<summary> <summary>
医院奖罚 行号
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.Adjust"> <member name="P:Performance.DtoModels.PerDataSpecialUnit.AccountingUnit">
<summary> <summary>
调节系数 核算单元
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.Department">
<summary>
科室名称
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.Number">
<summary>
人数
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.QuantitativeIndicators">
<summary>
量化指标
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.Quantity">
<summary>
数量
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.QuantitativeIndicatorsValue">
<summary>
量化指标绩效分值
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataSpecialUnit.Efficiency"> <member name="P:Performance.DtoModels.PerDataSpecialUnit.Efficiency">
......
...@@ -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);
......
...@@ -238,43 +238,26 @@ public void Save(List<PerSheet> perSheets, int allotId) ...@@ -238,43 +238,26 @@ public void Save(List<PerSheet> perSheets, int allotId)
return (perSheet, mergeSheets); return (perSheet, mergeSheets);
} }
/// <summary> /// <summary>
/// 计算科室绩效 /// 计算科室绩效
/// </summary> /// </summary>
/// <param name="dataList"></param> /// <param name="excel"></param>
/// <param name="economicData"></param> /// <param name="perSheet"></param>
/// <param name="workloadData"></param>
/// <returns></returns> /// <returns></returns>
public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_baiscnorm> baiscnormList, bool isFirst = false) public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, IEnumerable<AccountUnitTotal> extras)
{ {
var deptAccounting = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic); var accountList = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic)?.PerData?.Select(t => (PerDataAccountBaisc)t);
var accountList = deptAccounting.PerData.Select(t => (PerDataAccountBaisc)t); var economicData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeEconomic)?.PerData?.Select(t => (PerData)t);
var doctorWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorWorkload)?.PerData?.Select(t => (PerData)t);
var deptExtra = new List<PerData>(); var nurseWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeNurseWorkload)?.PerData?.Select(t => (PerData)t);
var deptAccountAssess = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountAssess);
if (deptAccountAssess != null && deptAccountAssess.PerData != null)
{
var assessList = deptAccountAssess.PerData?.Select(t => (PerData)t);
if (isFirst && assessList != null && assessList.Any())
{
deptExtra = assessList.GroupBy(t => new { t.UnitType, t.AccountingUnit, t.Department }).Select(t => new PerData
{
UnitType = t.Key.UnitType,
AccountingUnit = t.Key.AccountingUnit,
Department = t.Key.Department,
CellValue = t.Sum(g => g.CellValue)
}).ToList();
}
}
var economicData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeEconomic)?.PerData.Select(t => (PerData)t);
var doctorWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorWorkload)?.PerData.Select(t => (PerData)t);
var nurseWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeNurseWorkload)?.PerData.Select(t => (PerData)t);
var pairs = new[] var pairs = new[]
{ {
new { Name = "医生组临床科室单元核算表", Data = doctorWorkloadData, SheetType = SheetType.ComputeDoctorAccount, UnitTypes = new List<UnitType> { UnitType.医生组, UnitType.医技组, UnitType.专家组, UnitType.其他医技组,UnitType.其他医生组 } }, new { Name = "医生组临床科室单元核算表", Data = doctorWorkloadData, SheetType = SheetType.ComputeDoctorAccount,
new { Name = "护理组临床科室单元核算表", Data = nurseWorkloadData, SheetType = SheetType.ComputeNurseAccount, UnitTypes = new List<UnitType> { UnitType.护理组, UnitType.其他护理组 } }, UnitTypes = new List<UnitType> { UnitType.医生组, UnitType.医技组, UnitType.专家组, UnitType.其他医技组,UnitType.其他医生组 } },
new { Name = "护理组临床科室单元核算表", Data = nurseWorkloadData, SheetType = SheetType.ComputeNurseAccount,
UnitTypes = new List<UnitType> { UnitType.护理组, UnitType.其他护理组 } },
}; };
List<PerSheet> result = new List<PerSheet>(); List<PerSheet> result = new List<PerSheet>();
foreach (var info in pairs) foreach (var info in pairs)
...@@ -282,94 +265,33 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_ ...@@ -282,94 +265,33 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
PerSheet sheet = new PerSheet(info.Name, info.Name, info.SheetType, new List<PerHeader>(), new List<IPerData>()); PerSheet sheet = new PerSheet(info.Name, info.Name, info.SheetType, new List<PerHeader>(), new List<IPerData>());
foreach (var unitType in info.UnitTypes) foreach (var unitType in info.UnitTypes)
{ {
var atDataList = accountList.Where(t => t.UnitType == unitType.ToString()); var atDataList = accountList?.Where(t => t.UnitType == unitType.ToString() && !string.IsNullOrEmpty(t.AccountingUnit));
if (atDataList == null || !atDataList.Any()) foreach (var dept in atDataList)
continue;
foreach (var dept in accountList.Where(t => t.UnitType == unitType.ToString()))
{ {
if (string.IsNullOrEmpty(dept.AccountingUnit)) //科室奖罚汇总结果
continue; var extra = extras.FirstOrDefault(w => w.UnitType == unitType.ToString() && w.AccountingUnit == dept.AccountingUnit)?.TotelValue;
var econDoctor = economicData.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
var workDoctor = info.Data.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department); var econDoctor = economicData.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.AccountingUnit);
var workDoctor = info.Data.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.AccountingUnit);
if (UnitType.专家组 == unitType || UnitType.其他医技组 == unitType || UnitType.其他医生组 == unitType || UnitType.其他护理组 == unitType) if (UnitType.专家组 == unitType || UnitType.其他医技组 == unitType || UnitType.其他医生组 == unitType || UnitType.其他护理组 == unitType)
{ {
econDoctor = economicData.FirstOrDefault(t => t.AccountingUnit == dept.Department); econDoctor = economicData.FirstOrDefault(t => t.AccountingUnit == dept.AccountingUnit);
workDoctor = info.Data.FirstOrDefault(t => t.AccountingUnit == dept.Department); workDoctor = info.Data.FirstOrDefault(t => t.AccountingUnit == dept.AccountingUnit);
} }
else if (UnitType.医技组 == unitType && workDoctor == null) if (UnitType.医技组 == unitType && workDoctor == null)
{ workDoctor = info.Data.FirstOrDefault(t => t.UnitType == UnitType.医生组.ToString());
workDoctor = info.Data.FirstOrDefault(t => t.AccountingUnit == dept.Department && t.UnitType == UnitType.医生组.ToString());
}
//保底绩效
if (!string.IsNullOrEmpty(dept.MinimumReference))
{
string minimumReference = dept.MinimumReference;
if (dept.MinimumReference == EnumHelper.GetDescription(MinimumType.自定义保底))
minimumReference = GetCustomMinimumName(dept.Department, unitType.ToString());
var minimum = baiscnormList.FirstOrDefault(t => t.PositionName == minimumReference);
if (minimum != null)
dept.MinimumFee = minimum.AvgValue * (dept.MinimumFactor ?? 0) * (dept.ManagerNumber + dept.Number);
}
var extra = deptExtra.FirstOrDefault(t => t.AccountingUnit == dept.AccountingUnit && t.UnitType == dept.UnitType && t.Department == dept.Department);
if (isFirst && extra != null)
dept.Extra += extra.CellValue ?? 0;
dept.MedicineFactor = workDoctor?.MedicineFactor; dept.MedicineFactor = workDoctor?.MedicineFactor;
dept.ScoringAverage = dept.ScoringAverage == 0m ? 1 : dept.ScoringAverage; dept.ScoringAverage = dept.ScoringAverage == 0m ? 1 : dept.ScoringAverage;
dept.AdjustFactor = dept.AdjustFactor == 0m ? 1 : dept.AdjustFactor; dept.AdjustFactor = dept.AdjustFactor == 0m ? 1 : dept.AdjustFactor;
dept.WorkSlopeFactor = dept.WorkSlopeFactor == 0m ? 1 : dept.WorkSlopeFactor;
dept.Income = econDoctor?.CellValue ?? 0; dept.Income = econDoctor?.CellValue ?? 0;
dept.WorkloadFee = dept.WorkSlopeFactor * (workDoctor?.CellValue ?? 0); dept.WorkloadFee = workDoctor?.CellValue ?? 0;
dept.PerforFee = dept.Income * (dept.BasicFactor + dept.SlopeFactor); dept.PerforFee = dept.Income * dept.BasicFactor;
dept.PerforTotal = Math.Round((dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1 + (dept.MinimumFee ?? 0)) ?? 0); dept.PerforTotal = Math.Round((dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1) ?? 0);
dept.RealGiveFee = Math.Round(((dept.PerforTotal * dept.ScoringAverage + dept.MedicineExtra + dept.MaterialsExtra + dept.Extra + dept.OtherPerfor2) * dept.AdjustFactor) ?? 0); dept.RealGiveFee = Math.Round(((dept.PerforTotal * dept.ScoringAverage + dept.MedicineExtra + dept.MaterialsExtra + dept.OtherPerfor2 + (extra ?? 0)) * dept.AdjustFactor) ?? 0);
dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number); dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
} }
#region 共用核算单元算法调整20190920新都调整
var multi = atDataList.GroupBy(t => new { t.UnitType, t.AccountingUnit })
.Select(t => new { t.Key.UnitType, t.Key.AccountingUnit, Count = t.Count(), })
.Where(t => t.Count > 1);
if (multi != null && multi.Any())
{
foreach (var item in atDataList)
{
if (multi.Any(group => group.UnitType == item.UnitType && group.AccountingUnit == item.AccountingUnit))
item.Remark = "特殊科室,共用核算单元";
}
}
//var multi = atDataList.GroupBy(t => new { t.UnitType, t.AccountingUnit })
// .Select(t => new
// {
// UnitType = t.Key.UnitType,
// AccountingUnit = t.Key.AccountingUnit,
// Count = t.Count(),
// RealGiveFee = t.Sum(p => p.RealGiveFee),
// PerforTotal = t.Sum(p => p.PerforTotal),
// Avg = t.Sum(p => p.ManagerNumber + p.Number) == 0 ? 0 : t.Sum(p => p.RealGiveFee) / t.Sum(p => p.ManagerNumber + p.Number)
// })
// .Where(t => t.Count > 1).ToArray();
//if (multi != null && multi.Any())
//{
// foreach (var item in atDataList)
// {
// if (multi.Any(group => group.UnitType == item.UnitType && group.AccountingUnit == item.AccountingUnit))
// {
// item.Avg = multi.FirstOrDefault(group => group.AccountingUnit == item.AccountingUnit).Avg;
// item.RealGiveFee = multi.FirstOrDefault(group => group.AccountingUnit == item.AccountingUnit).RealGiveFee;
// item.PerforTotal = multi.FirstOrDefault(group => group.AccountingUnit == item.AccountingUnit).PerforTotal;
// item.Remark = "特殊科室,共用核算单元";
// }
// }
//}
#endregion
sheet.PerData.AddRange(atDataList); sheet.PerData.AddRange(atDataList);
} }
result.Add(sheet); result.Add(sheet);
...@@ -377,145 +299,190 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_ ...@@ -377,145 +299,190 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
return result; return result;
} }
/// <summary> /// <summary>
/// 计算保底绩效参考标准 /// 获取科室奖罚汇总结果
/// </summary> /// </summary>
/// <param name="baiscnormList"></param> /// <param name="excel"></param>
/// <param name="allotId"></param> public IEnumerable<AccountUnitTotal> GetAccountExtra(PerExcel excel)
public List<res_baiscnorm> ComputeMinimum(PerExcel excel, List<PerSheet> perSheet, int allotId)
{ {
var deptAccounting = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic); var assessList = excel.PerSheet
var accountList = deptAccounting.PerData.Select(t => (PerDataAccountBaisc)t); .FirstOrDefault(t => t.SheetType == SheetType.AccountExtra)
?.PerData
?.Select(t => (PerData)t);
var economicData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeEconomic)?.PerData.Select(t => (PerData)t); return assessList
var doctorWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorWorkload)?.PerData.Select(t => (PerData)t); ?.GroupBy(t => new { t.UnitType, t.AccountingUnit })
var nurseWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeNurseWorkload)?.PerData.Select(t => (PerData)t); ?.Select(t => new AccountUnitTotal { UnitType = t.Key.UnitType, AccountingUnit = t.Key.AccountingUnit, TotelValue = t.Sum(g => g.CellValue) });
}
var basicRuleList = new[] /// <summary>
/// 业务中层行政中高层医院奖罚
/// </summary>
/// <param name="excel"></param>
public IEnumerable<EmpolyeeTotal> GetEmployeeExtra(PerExcel excel)
{ {
new { Data = doctorWorkloadData, MinimumType = MinimumType.保底临床医生, UnitType = UnitType.医生组 }, var assessList = excel.PerSheet
new { Data = doctorWorkloadData, MinimumType = MinimumType.保底医技医生, UnitType = UnitType.医技组 }, .FirstOrDefault(t => t.SheetType == SheetType.PersonExtra)
new { Data = nurseWorkloadData, MinimumType = MinimumType.保底护士, UnitType = UnitType.护理组 }, ?.PerData
}; ?.Select(t => (PerData)t);
List<res_baiscnorm> baiscnormList = new List<res_baiscnorm>();
foreach (var rule in basicRuleList) return assessList
?.GroupBy(t => new
{ {
var dataList = accountList.Where(t => t.UnitType == rule.UnitType.ToString()); t.UnitType,
var count = dataList.Sum(t => t.ManagerNumber + t.Number); t.AccountingUnit,
decimal totalValue = 0m; t.JobNumber,
foreach (var dept in dataList) t.EmployeeName,
})
?.Select(t => new EmpolyeeTotal
{ {
var econDoctor = economicData.FirstOrDefault(t => t.UnitType == rule.UnitType.ToString() && t.AccountingUnit == dept.Department); UnitType = t.Key.UnitType,
var workDoctor = rule.Data.FirstOrDefault(t => t.UnitType == rule.UnitType.ToString() && t.AccountingUnit == dept.Department); AccountingUnit = t.Key.AccountingUnit,
JobNumber = t.Key.JobNumber,
EmployeeName = t.Key.EmployeeName,
TotelValue = t.Sum(g => g.CellValue)
});
}
var income = econDoctor?.CellValue ?? 0;
var workloadFee = workDoctor?.CellValue ?? 0;
var perforFee = income * (dept.BasicFactor + dept.SlopeFactor);
var perforTotal = perforFee + workloadFee;
totalValue += perforTotal; ///// <summary>
} ///// 计算保底绩效参考标准
var baiscnorm = new res_baiscnorm ///// </summary>
{ ///// <param name="baiscnormList"></param>
AllotID = allotId, ///// <param name="allotId"></param>
PositionName = EnumHelper.GetDescription(rule.MinimumType), //public List<res_baiscnorm> ComputeMinimum(PerExcel excel, List<PerSheet> perSheet, int allotId)
TotelNumber = count, //{
TotelValue = totalValue, // var deptAccounting = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic);
AvgValue = count == 0 ? 0 : totalValue / count // var accountList = deptAccounting.PerData.Select(t => (PerDataAccountBaisc)t);
};
baiscnormList.Add(baiscnorm);
}
return baiscnormList; // var economicData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeEconomic)?.PerData.Select(t => (PerData)t);
} // var doctorWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorWorkload)?.PerData.Select(t => (PerData)t);
// var nurseWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeNurseWorkload)?.PerData.Select(t => (PerData)t);
/// <summary> // var basicRuleList = new[]
/// 计算科室自定义保底绩效范围(根据配置的科室范围计算人均绩效) // {
/// </summary> // new { Data = doctorWorkloadData, MinimumType = MinimumType.保底临床医生, UnitType = UnitType.医生组 },
/// <param name="excel"></param> // new { Data = doctorWorkloadData, MinimumType = MinimumType.保底医技医生, UnitType = UnitType.医技组 },
/// <param name="perSheet"></param> // new { Data = nurseWorkloadData, MinimumType = MinimumType.保底护士, UnitType = UnitType.护理组 },
/// <param name="baiscnormList"></param> // };
/// <param name="allotId"></param> // List<res_baiscnorm> baiscnormList = new List<res_baiscnorm>();
public void ComputeCustomMinimum(PerExcel excel, List<PerSheet> perSheet, List<res_baiscnorm> baiscnormList, int allotId)
{
var guaranteeList = guaranteeService.Guarantee(allotId);
if (guaranteeList == null || !guaranteeList.Any())
return;
var guaranteeGroupList = guaranteeList // foreach (var rule in basicRuleList)
.Where(t => !string.IsNullOrEmpty(t.Target) && !string.IsNullOrEmpty(t.Source)) // {
.GroupBy(t => new { t.UnitType, t.Target }) // var dataList = accountList.Where(t => t.UnitType == rule.UnitType.ToString());
.Select(t => new { t.Key.UnitType, t.Key.Target, Priority = t.Min(m => m.Priority), Items = t.Select(m => m.Source) }); // var count = dataList.Sum(t => t.ManagerNumber + t.Number);
// decimal totalValue = 0m;
// foreach (var dept in dataList)
// {
// var econDoctor = economicData.FirstOrDefault(t => t.UnitType == rule.UnitType.ToString() && t.AccountingUnit == dept.Department);
// var workDoctor = rule.Data.FirstOrDefault(t => t.UnitType == rule.UnitType.ToString() && t.AccountingUnit == dept.Department);
var deptAccounting = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic); // var income = econDoctor?.CellValue ?? 0;
var accountList = deptAccounting.PerData.Select(t => (PerDataAccountBaisc)t); // var workloadFee = workDoctor?.CellValue ?? 0;
// var perforFee = income * (dept.BasicFactor + dept.SlopeFactor);
// var perforTotal = perforFee + workloadFee;
var economicData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeEconomic)?.PerData.Select(t => (PerData)t); // totalValue += perforTotal;
var doctorWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorWorkload)?.PerData.Select(t => (PerData)t); // }
var nurseWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeNurseWorkload)?.PerData.Select(t => (PerData)t); // var baiscnorm = new res_baiscnorm
// {
// AllotID = allotId,
// PositionName = EnumHelper.GetDescription(rule.MinimumType),
// TotelNumber = count,
// TotelValue = totalValue,
// AvgValue = count == 0 ? 0 : totalValue / count
// };
// baiscnormList.Add(baiscnorm);
// }
// return baiscnormList;
//}
var basicRuleList = new[] ///// <summary>
{ ///// 计算科室自定义保底绩效范围(根据配置的科室范围计算人均绩效)
new { Data = doctorWorkloadData, UnitType = UnitType.医生组 }, ///// </summary>
new { Data = doctorWorkloadData, UnitType = UnitType.医技组 }, ///// <param name="excel"></param>
new { Data = nurseWorkloadData, UnitType = UnitType.护理组 }, ///// <param name="perSheet"></param>
}; ///// <param name="baiscnormList"></param>
List<res_baiscnorm> newBaiscnormList = new List<res_baiscnorm>(); ///// <param name="allotId"></param>
foreach (var guaranteeGroup in guaranteeGroupList) //public void ComputeCustomMinimum(PerExcel excel, List<PerSheet> perSheet, List<res_baiscnorm> baiscnormList, int allotId)
{ //{
var unitType = (UnitType)guaranteeGroup.UnitType; // var guaranteeList = guaranteeService.Guarantee(allotId);
var dataList = accountList.Where(t => t.UnitType == unitType.ToString() && guaranteeGroup.Items.Contains(t.Department)); // if (guaranteeList == null || !guaranteeList.Any())
var count = dataList.Sum(t => t.ManagerNumber + t.Number); // return;
decimal totalValue = 0m;
foreach (var dept in dataList)
{
var econDoctor = economicData.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
var workdata = basicRuleList.FirstOrDefault(t => t.UnitType == unitType)?.Data;
var workload = workdata == null ? null : workdata.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
//保底绩效
var minimumReference = dept.MinimumReference;
if (dept.MinimumReference == EnumHelper.GetDescription(MinimumType.自定义保底))
minimumReference = GetCustomMinimumName(dept.Department, unitType.ToString());
var minimum = baiscnormList.FirstOrDefault(t => t.PositionName == minimumReference);
if (!string.IsNullOrEmpty(dept.MinimumReference) && minimum != null)
dept.MinimumFee = minimum.AvgValue * (dept.MinimumFactor ?? 0) * (dept.ManagerNumber + dept.Number);
dept.ScoringAverage = dept.ScoringAverage == 0m ? 1 : dept.ScoringAverage; // var guaranteeGroupList = guaranteeList
dept.AdjustFactor = dept.AdjustFactor == 0m ? 1 : dept.AdjustFactor; // .Where(t => !string.IsNullOrEmpty(t.Target) && !string.IsNullOrEmpty(t.Source))
dept.Income = econDoctor?.CellValue ?? 0; // .GroupBy(t => new { t.UnitType, t.Target })
dept.WorkloadFee = workload?.CellValue ?? 0; // .Select(t => new { t.Key.UnitType, t.Key.Target, Priority = t.Min(m => m.Priority), Items = t.Select(m => m.Source) });
dept.PerforFee = dept.Income * (dept.BasicFactor + dept.SlopeFactor);
dept.PerforTotal = dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1 + (dept.MinimumFee ?? 0);
dept.RealGiveFee = (dept.PerforTotal * dept.ScoringAverage + dept.MedicineExtra + dept.MaterialsExtra + dept.Extra + dept.OtherPerfor2) * dept.AdjustFactor;
dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
totalValue += (dept.PerforTotal ?? 0); // var deptAccounting = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic);
} // var accountList = deptAccounting.PerData.Select(t => (PerDataAccountBaisc)t);
var baiscnorm = new res_baiscnorm
{
AllotID = allotId,
PositionName = GetCustomMinimumName(guaranteeGroup.Target, unitType.ToString()),
TotelNumber = count,
TotelValue = totalValue,
AvgValue = count == 0 ? 0 : totalValue / count
};
baiscnormList.Add(baiscnorm);
}
}
/// <summary> // var economicData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeEconomic)?.PerData.Select(t => (PerData)t);
/// 生成自定义保底名称 // var doctorWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorWorkload)?.PerData.Select(t => (PerData)t);
/// </summary> // var nurseWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeNurseWorkload)?.PerData.Select(t => (PerData)t);
/// <param name="department"></param>
/// <returns></returns>
private string GetCustomMinimumName(string department, string unitType) // var basicRuleList = new[]
{ // {
return $"{EnumHelper.GetDescription(MinimumType.自定义保底)}({unitType}-{department})"; // new { Data = doctorWorkloadData, UnitType = UnitType.医生组 },
} // new { Data = doctorWorkloadData, UnitType = UnitType.医技组 },
// new { Data = nurseWorkloadData, UnitType = UnitType.护理组 },
// };
// List<res_baiscnorm> newBaiscnormList = new List<res_baiscnorm>();
// foreach (var guaranteeGroup in guaranteeGroupList)
// {
// var unitType = (UnitType)guaranteeGroup.UnitType;
// var dataList = accountList.Where(t => t.UnitType == unitType.ToString() && guaranteeGroup.Items.Contains(t.Department));
// var count = dataList.Sum(t => t.ManagerNumber + t.Number);
// decimal totalValue = 0m;
// foreach (var dept in dataList)
// {
// var econDoctor = economicData.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
// var workdata = basicRuleList.FirstOrDefault(t => t.UnitType == unitType)?.Data;
// var workload = workdata == null ? null : workdata.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
// //保底绩效
// var minimumReference = dept.MinimumReference;
// if (dept.MinimumReference == EnumHelper.GetDescription(MinimumType.自定义保底))
// minimumReference = GetCustomMinimumName(dept.Department, unitType.ToString());
// var minimum = baiscnormList.FirstOrDefault(t => t.PositionName == minimumReference);
// if (!string.IsNullOrEmpty(dept.MinimumReference) && minimum != null)
// dept.MinimumFee = minimum.AvgValue * (dept.MinimumFactor ?? 0) * (dept.ManagerNumber + dept.Number);
// dept.ScoringAverage = dept.ScoringAverage == 0m ? 1 : dept.ScoringAverage;
// dept.AdjustFactor = dept.AdjustFactor == 0m ? 1 : dept.AdjustFactor;
// dept.Income = econDoctor?.CellValue ?? 0;
// dept.WorkloadFee = workload?.CellValue ?? 0;
// dept.PerforFee = dept.Income * (dept.BasicFactor + dept.SlopeFactor);
// dept.PerforTotal = dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1 + (dept.MinimumFee ?? 0);
// dept.RealGiveFee = (dept.PerforTotal * dept.ScoringAverage + dept.MedicineExtra + dept.MaterialsExtra + dept.Extra + dept.OtherPerfor2) * dept.AdjustFactor;
// dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
// totalValue += (dept.PerforTotal ?? 0);
// }
// var baiscnorm = new res_baiscnorm
// {
// AllotID = allotId,
// PositionName = GetCustomMinimumName(guaranteeGroup.Target, unitType.ToString()),
// TotelNumber = count,
// TotelValue = totalValue,
// AvgValue = count == 0 ? 0 : totalValue / count
// };
// baiscnormList.Add(baiscnorm);
// }
//}
///// <summary>
///// 生成自定义保底名称
///// </summary>
///// <param name="department"></param>
///// <returns></returns>
//private string GetCustomMinimumName(string department, string unitType)
//{
// return $"{EnumHelper.GetDescription(MinimumType.自定义保底)}({unitType}-{department})";
//}
/// <summary> /// <summary>
/// 获取药占比分割比例 /// 获取药占比分割比例
......
...@@ -25,6 +25,7 @@ public class ResultComputeService : IAutoInjection ...@@ -25,6 +25,7 @@ public class ResultComputeService : IAutoInjection
private readonly PerforImaccountbasicRepository perforImaccountbasicRepository; private readonly PerforImaccountbasicRepository perforImaccountbasicRepository;
private readonly LogManageService logManageService; private readonly LogManageService logManageService;
private readonly PerforImemployeeclinicRepository perforImemployeeclinicRepository; private readonly PerforImemployeeclinicRepository perforImemployeeclinicRepository;
private readonly PerforImemployeelogisticsRepository perforImemployeelogisticsRepository;
public ResultComputeService( public ResultComputeService(
PerforImemployeeRepository perforImEmployeeRepository, PerforImemployeeRepository perforImEmployeeRepository,
...@@ -34,7 +35,8 @@ public class ResultComputeService : IAutoInjection ...@@ -34,7 +35,8 @@ public class ResultComputeService : IAutoInjection
PerforImaccountbasicRepository perforImaccountbasicRepository, PerforImaccountbasicRepository perforImaccountbasicRepository,
BaiscNormService baiscNormService, ComputeDirector computeDirector, BaiscNormService baiscNormService, ComputeDirector computeDirector,
LogManageService logManageService, BudgetService budgetService, LogManageService logManageService, BudgetService budgetService,
PerforImemployeeclinicRepository perforImemployeeclinicRepository) PerforImemployeeclinicRepository perforImemployeeclinicRepository,
PerforImemployeelogisticsRepository perforImemployeelogisticsRepository)
{ {
this.baiscNormService = baiscNormService; this.baiscNormService = baiscNormService;
this.computeDirector = computeDirector; this.computeDirector = computeDirector;
...@@ -46,13 +48,15 @@ public class ResultComputeService : IAutoInjection ...@@ -46,13 +48,15 @@ public class ResultComputeService : IAutoInjection
this.logManageService = logManageService; this.logManageService = logManageService;
this.budgetService = budgetService; this.budgetService = budgetService;
this.perforImemployeeclinicRepository = perforImemployeeclinicRepository; this.perforImemployeeclinicRepository = perforImemployeeclinicRepository;
this.perforImemployeelogisticsRepository = perforImemployeelogisticsRepository;
} }
/// <summary> /// <summary>
/// 计算最终数据 /// 计算最终数据
/// </summary> /// </summary>
/// <param name="excel"></param> /// <param name="excel"></param>
public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerSheet> accountSheet, bool isMinimum = false) public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerSheet> accountSheet,
IEnumerable<EmpolyeeTotal> employeeExtra)
{ {
//取出人员信息 //取出人员信息
var empolyeeList = perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allot.ID); var empolyeeList = perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allot.ID);
...@@ -60,27 +64,33 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee ...@@ -60,27 +64,33 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
List<ComputeEmployee> computeEmployees = Mapper.Map<List<ComputeEmployee>>(empolyeeList); List<ComputeEmployee> computeEmployees = Mapper.Map<List<ComputeEmployee>>(empolyeeList);
logManageService.WriteMsg("正在生成绩效", "临床科室主任、临床科室副主任、临床科室护士长 最终绩效数据计算", 1, allot.ID, "ReceiveMessage"); logManageService.WriteMsg("正在生成绩效", "科室主任、护士长 最终绩效数据计算", 1, allot.ID, "ReceiveMessage");
var computResult = computeDirector.Compute(computeEmployees, accountbasicList, accountSheet, allot, isMinimum); var computResult = computeDirector.Compute(computeEmployees, accountSheet, allot, employeeExtra);
//计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值) //计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值)
List<res_baiscnorm> baiscnormList = new List<res_baiscnorm>(); List<res_baiscnorm> baiscnormList = new List<res_baiscnorm>();
baiscNormService.ComputeAvg(baiscnormList, accountbasicList, computResult); baiscNormService.ComputeAvg(baiscnormList, accountbasicList, computResult);
baiscNormService.DocterNurseBaiscnorm(baiscnormList, accountbasicList, accountSheet); baiscNormService.DocterNurseBaiscnorm(baiscnormList, accountbasicList, accountSheet);
var empolyeeList1 = perforImEmployeeRepository.GetEntities(t => t.AllotID == allot.ID); var empolyeeList2 = perforImEmployeeRepository.GetEntities(t => t.AllotID == allot.ID);
computeEmployees = Mapper.Map<List<ComputeEmployee>>(empolyeeList1); var computeEmployees2 = Mapper.Map<List<ComputeEmployee>>(empolyeeList2);
logManageService.WriteMsg("正在生成绩效", "院领导、业务中层、工勤人员 最终绩效数据计算", 1, allot.ID, "ReceiveMessage"); logManageService.WriteMsg("正在生成绩效", "行政中高层 最终绩效数据计算", 1, allot.ID, "ReceiveMessage");
var computResult2 = computeDirector.Compute(computeEmployees, allot, baiscnormList); var computResult2 = computeDirector.Compute(computeEmployees2, allot, baiscnormList, employeeExtra);
var empolyeeList3 = perforImemployeelogisticsRepository.GetEntities(t => t.AllotID == allot.ID);
var computeEmployees3 = Mapper.Map<List<ComputeEmployee>>(empolyeeList3);
logManageService.WriteMsg("正在生成绩效", "行政后勤 最终绩效数据计算", 1, allot.ID, "ReceiveMessage");
var computResult3 = computeDirector.Compute(computeEmployees3, allot, baiscnormList, employeeExtra);
//计算 行政中高层 平均值
baiscNormService.ComputeOtherAvg(baiscnormList, computResult2, empolyeeList2);
//计算 行政人员 平均值 //计算 行政人员 平均值
baiscNormService.ComputeOtherAvg(baiscnormList, computResult2, empolyeeList1); baiscNormService.ComputeOtherAvg(baiscnormList, computResult3, empolyeeList3);
if (!isMinimum)
{
var computes = Mapper.Map<List<res_compute>>(computResult); var computes = Mapper.Map<List<res_compute>>(computResult);
computes.AddRange(Mapper.Map<List<res_compute>>(computResult2)); computes.AddRange(Mapper.Map<List<res_compute>>(computResult2));
computes.AddRange(Mapper.Map<List<res_compute>>(computResult3));
computes.ForEach(t => t.AllotID = allot.ID); computes.ForEach(t => t.AllotID = allot.ID);
perforRescomputeRepository.AddRange(computes.ToArray()); perforRescomputeRepository.AddRange(computes.ToArray());
}
baiscnormList.ForEach(t => t.AllotID = allot.ID); baiscnormList.ForEach(t => t.AllotID = allot.ID);
logManageService.WriteMsg("正在生成绩效", "保存最终绩效数据", 1, allot.ID, "ReceiveMessage"); logManageService.WriteMsg("正在生成绩效", "保存最终绩效数据", 1, allot.ID, "ReceiveMessage");
...@@ -94,58 +104,24 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee ...@@ -94,58 +104,24 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
/// </summary> /// </summary>
/// <param name="excel"></param> /// <param name="excel"></param>
/// <param name="allot"></param> /// <param name="allot"></param>
public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscnorm> baiscnormList) public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<PerSheet> sheetLast, List<res_baiscnorm> baiscnormList,
IEnumerable<AccountUnitTotal> accountExtras, IEnumerable<EmpolyeeTotal> employeeExtra)
{ {
var isBudget = budgetService.GetAdjustAndGrant(allot, out decimal adjust, out decimal grant);
var typeList = EnumHelper.GetItems<PerforType>();
var specialUnit = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.SpecialUnit); var specialUnit = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.SpecialUnit);
if (specialUnit == null || specialUnit.PerData.Count == 0) if (specialUnit == null || specialUnit.PerData.Count == 0)
return; return;
var typeList = EnumHelper.GetItems<PerforType>();
var dataList = specialUnit.PerData.Select(t => (PerDataSpecialUnit)t);
var specialEmployee = perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allot.ID);
var isBudget = budgetService.GetAdjustAndGrant(allot, out decimal adjust, out decimal grant); var dataList = xxx(specialUnit, allot, baiscnormList, typeList);
//替换考核基数 //取出科室
foreach (var item in dataList) var accountList = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic)?.PerData?.Select(t => (PerDataAccountBaisc)t);
{
if (specialEmployee != null && specialEmployee.FirstOrDefault(t => t.AccountingUnit == item.AccountingUnit) != null)
{
item.Efficiency = specialEmployee.FirstOrDefault(t => t.AccountingUnit == item.AccountingUnit).Efficiency ?? 1;
item.Scale = specialEmployee.FirstOrDefault(t => t.AccountingUnit == item.AccountingUnit).Scale ?? 1;
item.Management = specialEmployee.FirstOrDefault(t => t.AccountingUnit == item.AccountingUnit).Management ?? 1;
}
var type = typeList.FirstOrDefault(o => o.Description == item.QuantitativeIndicators);
if (type != null)
{
if (type.Value == (int)PerforType.医生护士平均)
{
var doctor = baiscNormService.GetBaiscNorm(baiscnormList, PerforType.临床医生) ?? 0;
var nurse = baiscNormService.GetBaiscNorm(baiscnormList, PerforType.护士) ?? 0;
// 添加参数计算
item.Quantity = item.Quantity ?? (doctor + nurse) / 2;
}
else
{
//var radio = perforImEmployeeRepository.GetEntities(p => p.FitPeople == EnumHelper.GetDescription((PerforType)type.Value) && p.AllotID == allot.ID)
// ?.FirstOrDefault().FitPeopleRatio ?? 1;
var basic = baiscNormService.GetBaiscNorm(baiscnormList, (PerforType)type.Value);
// 添加参数计算
item.Quantity = item.Quantity ?? (basic ?? 0);
}
}
}
List<res_specialunit> resDataList = new List<res_specialunit>(); List<res_specialunit> resDataList = new List<res_specialunit>();
var groupSpeList = dataList.GroupBy(t => t.AccountingUnit).Select(t => new var groupSpeList = dataList.GroupBy(t => t.AccountingUnit).Select(t => new { AccountingUnit = t.Key, Number = t.Max(p => p.Number), });
{
AccountingUnit = t.Key,
Number = t.Max(p => p.Number),
ScoringAverage = t.Max(p => p.ScoringAverage),
OtherPerfor = t.Max(p => p.OtherPerfor),
Punishment = t.Max(p => p.Punishment),
Adjust = t.Max(p => p.Adjust),
});
var empolyeeList = perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allot.ID && t.UnitType == UnitType.特殊核算组.ToString()); var empolyeeList = perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allot.ID && t.UnitType == UnitType.特殊核算组.ToString());
List<ComputeEmployee> computeEmployees = Mapper.Map<List<ComputeEmployee>>(empolyeeList); List<ComputeEmployee> computeEmployees = Mapper.Map<List<ComputeEmployee>>(empolyeeList);
...@@ -153,6 +129,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -153,6 +129,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
foreach (var group in groupSpeList) foreach (var group in groupSpeList)
{ {
// 获取科室测算信息
var dept = accountList?.FirstOrDefault(t => t.UnitType == UnitType.特殊核算组.ToString() && !string.IsNullOrEmpty(t.AccountingUnit));
//获取需要聚合的科室 //获取需要聚合的科室
var accountDataList = dataList.Where(t => t.AccountingUnit == group.AccountingUnit); var accountDataList = dataList.Where(t => t.AccountingUnit == group.AccountingUnit);
//计算量化指标子项合计 //计算量化指标子项合计
...@@ -167,7 +145,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -167,7 +145,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
return t.Quantity * t.QuantitativeIndicatorsValue * headcount; return t.Quantity * t.QuantitativeIndicatorsValue * headcount;
}); });
var groupAdjust = isBudget ? adjust : group.Adjust;
var groupAdjust = isBudget ? adjust : (dept?.AdjustFactor ?? 0);
foreach (var item in accountDataList) foreach (var item in accountDataList)
{ {
var res = new res_specialunit var res = new res_specialunit
...@@ -179,15 +158,19 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -179,15 +158,19 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
QuantitativeIndicators = item.QuantitativeIndicators, QuantitativeIndicators = item.QuantitativeIndicators,
Quantity = item.Quantity, Quantity = item.Quantity,
QuantitativeIndicatorsValue = item.QuantitativeIndicatorsValue, QuantitativeIndicatorsValue = item.QuantitativeIndicatorsValue,
ScoringAverage = group.ScoringAverage, ScoringAverage = dept?.ScoringAverage,
OtherPerfor = group.OtherPerfor, //OtherPerfor = dept?.OtherPerfor,
Punishment = group.Punishment, //Punishment = group.Punishment,
Adjust = (groupAdjust == 0) ? 1 : groupAdjust, Adjust = (groupAdjust == 0) ? 1 : groupAdjust,
}; };
res.GiveFee = (sumValue + (group.OtherPerfor ?? 0) + (group.Punishment ?? 0)); //科室奖罚汇总结果
res.RealGiveFee = res.GiveFee * (groupAdjust == 0 ? 1 : groupAdjust); var extra = accountExtras.FirstOrDefault(w => w.UnitType == UnitType.特殊核算组.ToString() && w.AccountingUnit == dept.AccountingUnit)?.TotelValue;
res.Avg = group.Number != 0 ? res.GiveFee / group.Number : null;
res.ResultsTotalFee = sumValue; res.GiveFee = Math.Round((sumValue + (extra ?? 0)) ?? 0);
res.RealGiveFee = Math.Round(res.GiveFee * (res.ScoringAverage ?? 0) * (groupAdjust == 0 ? 1 : groupAdjust) ?? 0);
res.Avg = Math.Round((group.Number != 0 ? res.GiveFee / group.Number : null) ?? 0);
res.ResultsTotalFee = Math.Round(sumValue ?? 0);
resDataList.Add(res); resDataList.Add(res);
} }
...@@ -198,19 +181,10 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -198,19 +181,10 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
foreach (var empolyee in empolyees) foreach (var empolyee in empolyees)
{ {
//if (empolyee == null) var extra = employeeExtra.Where(w => !string.IsNullOrEmpty(w.AccountingUnit) && !string.IsNullOrEmpty(w.UnitType)
//{ && (!string.IsNullOrEmpty(w.EmployeeName) || !string.IsNullOrEmpty(w.JobNumber)))
// empolyee = new ComputeEmployee .FirstOrDefault(w => w.AccountingUnit == empolyee.AccountingUnit && w.UnitType == empolyee.UnitType
// { && w.JobNumber == empolyee.JobNumber && w.EmployeeName == empolyee.DoctorName)?.TotelValue;
// AccountType = AccountUnitType.科主任.ToString(),
// DoctorName = "人员信息缺失",
// FitPeople = "",
// ScoreAverageRate = 1,
// Punishment = 0,
// OtherPerfor = 0,
// Adjust = 1,
// };
//}
var empolyeeAdjust = isBudget ? adjust : empolyee.Adjust; var empolyeeAdjust = isBudget ? adjust : empolyee.Adjust;
var compute = new ComputeResult var compute = new ComputeResult
...@@ -224,8 +198,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -224,8 +198,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
JobTitle = empolyee.JobTitle, JobTitle = empolyee.JobTitle,
ScoreAverageRate = empolyee.ScoreAverageRate, ScoreAverageRate = empolyee.ScoreAverageRate,
Punishment = empolyee.Punishment, //Punishment = empolyee.Punishment,
OtherPerfor = empolyee.OtherPerfor, //OtherPerfor = empolyee.OtherPerfor,
Number = group.Number, Number = group.Number,
PerforTotal = sumValue, PerforTotal = sumValue,
...@@ -237,13 +211,15 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -237,13 +211,15 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
compute.Efficiency = compute.Avg * (empolyee.Efficiency ?? 1); compute.Efficiency = compute.Avg * (empolyee.Efficiency ?? 1);
compute.Scale = compute.PerforTotal * (empolyee.Scale ?? 1); compute.Scale = compute.PerforTotal * (empolyee.Scale ?? 1);
//应发管理绩效 //应发管理绩效
compute.ShouldGiveFee = (compute.Efficiency + compute.Scale) * compute.Grant; compute.ShouldGiveFee = Math.Round((compute.Efficiency + compute.Scale) * compute.Grant ?? 0);
//绩效合计 //绩效合计
compute.PerforSumFee = compute.Avg + compute.ShouldGiveFee; compute.PerforSumFee = Math.Round(compute.Avg + compute.ShouldGiveFee ?? 0);
//应发绩效 //应发绩效
compute.GiveFee = compute.PerforSumFee; //compute.GiveFee = compute.PerforSumFee;
compute.GiveFee = Math.Round(compute.PerforSumFee * compute.ScoreAverageRate * (compute.Attendance ?? 0) + (extra ?? 0) ?? 0);
//实发绩效 //实发绩效
compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m); //compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m);
compute.RealGiveFee = Math.Round(compute.GiveFee * (compute.Adjust ?? 1m) ?? 0);
// 参考基数专用绩效合计 // 参考基数专用绩效合计
compute.BaiscNormPerforTotal = compute.PerforSumFee; compute.BaiscNormPerforTotal = compute.PerforSumFee;
...@@ -255,5 +231,42 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -255,5 +231,42 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
perforRescomputeRepository.AddRange(computes.ToArray()); perforRescomputeRepository.AddRange(computes.ToArray());
perforResspecialunitRepository.AddRange(resDataList.ToArray()); perforResspecialunitRepository.AddRange(resDataList.ToArray());
} }
private IEnumerable<PerDataSpecialUnit> xxx(PerSheet specialUnit, per_allot allot, List<res_baiscnorm> baiscnormList, List<EnumItem> typeList)
{
var dataList = specialUnit.PerData.Select(t => (PerDataSpecialUnit)t);
var specialEmployee = perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allot.ID);
//替换考核基数
foreach (var item in dataList)
{
if (specialEmployee != null && specialEmployee.FirstOrDefault(t => t.AccountingUnit == item.AccountingUnit) != null)
{
item.Efficiency = specialEmployee.FirstOrDefault(t => t.AccountingUnit == item.AccountingUnit).Efficiency ?? 1;
item.Scale = specialEmployee.FirstOrDefault(t => t.AccountingUnit == item.AccountingUnit).Scale ?? 1;
item.Management = specialEmployee.FirstOrDefault(t => t.AccountingUnit == item.AccountingUnit).Management ?? 1;
}
var type = typeList.FirstOrDefault(o => o.Description == item.QuantitativeIndicators);
if (type != null)
{
if (type.Value == (int)PerforType.医生护士平均)
{
var doctor = baiscNormService.GetBaiscNorm(baiscnormList, PerforType.临床医生) ?? 0;
var nurse = baiscNormService.GetBaiscNorm(baiscnormList, PerforType.护士) ?? 0;
// 添加参数计算
item.Quantity = item.Quantity ?? (doctor + nurse) / 2;
}
else
{
//var radio = perforImEmployeeRepository.GetEntities(p => p.FitPeople == EnumHelper.GetDescription((PerforType)type.Value) && p.AllotID == allot.ID)
// ?.FirstOrDefault().FitPeopleRatio ?? 1;
var basic = baiscNormService.GetBaiscNorm(baiscnormList, (PerforType)type.Value);
// 添加参数计算
item.Quantity = item.Quantity ?? (basic ?? 0);
}
}
}
return dataList;
}
} }
} }
...@@ -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);
......
...@@ -25,6 +25,7 @@ public class SheetSevice : IAutoInjection ...@@ -25,6 +25,7 @@ public class SheetSevice : IAutoInjection
//private PerforResaccountnurseRepository _perforImaccountnurseRepository; //private PerforResaccountnurseRepository _perforImaccountnurseRepository;
private PerforImspecialunitRepository _perforImspecialunitRepository; private PerforImspecialunitRepository _perforImspecialunitRepository;
private PerforImemployeeclinicRepository _perforImemployeeclinicRepository; private PerforImemployeeclinicRepository _perforImemployeeclinicRepository;
private readonly PerforImemployeelogisticsRepository _perforImemployeelogisticsRepository;
private readonly string[] percentparam = new string[] { "预算比例", "考核得分率", "调节系数" }; private readonly string[] percentparam = new string[] { "预算比例", "考核得分率", "调节系数" };
public SheetSevice(PerforPerallotRepository perforAllotRepository, public SheetSevice(PerforPerallotRepository perforAllotRepository,
...@@ -36,7 +37,8 @@ public class SheetSevice : IAutoInjection ...@@ -36,7 +37,8 @@ public class SheetSevice : IAutoInjection
PerforResaccountRepository perforResaccountRepository, PerforResaccountRepository perforResaccountRepository,
//PerforResaccountnurseRepository perforImaccountnurseRepository, //PerforResaccountnurseRepository perforImaccountnurseRepository,
PerforImspecialunitRepository perforImspecialunitRepository, PerforImspecialunitRepository perforImspecialunitRepository,
PerforImemployeeclinicRepository perforImemployeeclinicRepository) PerforImemployeeclinicRepository perforImemployeeclinicRepository,
PerforImemployeelogisticsRepository perforImemployeelogisticsRepository)
{ {
_perforAllotRepository = perforAllotRepository; _perforAllotRepository = perforAllotRepository;
_perforImSheetRepository = perforImSheetRepository; _perforImSheetRepository = perforImSheetRepository;
...@@ -48,6 +50,7 @@ public class SheetSevice : IAutoInjection ...@@ -48,6 +50,7 @@ public class SheetSevice : IAutoInjection
_perforImaccountbasicRepository = perforImaccountbasicRepository; _perforImaccountbasicRepository = perforImaccountbasicRepository;
_perforImspecialunitRepository = perforImspecialunitRepository; _perforImspecialunitRepository = perforImspecialunitRepository;
_perforImemployeeclinicRepository = perforImemployeeclinicRepository; _perforImemployeeclinicRepository = perforImemployeeclinicRepository;
this._perforImemployeelogisticsRepository = perforImemployeelogisticsRepository;
} }
/// <summary> /// <summary>
...@@ -88,6 +91,10 @@ public SheetExportResponse SheetExport(int sheetID) ...@@ -88,6 +91,10 @@ public SheetExportResponse SheetExport(int sheetID)
{ {
ClinicEmployeeExport(sheetID, response); ClinicEmployeeExport(sheetID, response);
} }
else if (sheet.SheetType == (int)SheetType.LogisticsEmployee)
{
LogisticsEmployeeExport(sheetID, response);
}
else if (sheet.SheetType == (int)SheetType.SpecialUnit) else if (sheet.SheetType == (int)SheetType.SpecialUnit)
{ {
SpecialUnitExport(sheetID, response); SpecialUnitExport(sheetID, response);
...@@ -390,57 +397,57 @@ private void AccountDoctorExport(int sheetID, SheetExportResponse response) ...@@ -390,57 +397,57 @@ private void AccountDoctorExport(int sheetID, SheetExportResponse response)
} }
} }
private void AccountBaiscExport(int sheetID, SheetExportResponse response) //private void AccountBaiscExport(int sheetID, SheetExportResponse response)
{ //{
var list = _perforImaccountbasicRepository.GetEntities(t => t.SheetID == sheetID)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.DoctorAccountingUnit); // var list = _perforImaccountbasicRepository.GetEntities(t => t.SheetID == sheetID)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.DoctorAccountingUnit);
if (list != null && list.Count() > 0) // if (list != null && list.Count() > 0)
{ // {
var row = new Row(0); // var row = new Row(0);
row.Data.Add(new Cell(1, "核算单元类型", 1, 1, false, false)); // row.Data.Add(new Cell(1, "核算单元类型", 1, 1, false, false));
row.Data.Add(new Cell(2, "核算单元", 1, 1, false, false)); // row.Data.Add(new Cell(2, "核算单元", 1, 1, false, false));
row.Data.Add(new Cell(3, "科室名称", 1, 1, false, false)); // row.Data.Add(new Cell(3, "科室名称", 1, 1, false, false));
row.Data.Add(new Cell(4, "科主任/护士长人数", 1, 1, false, false)); // row.Data.Add(new Cell(4, "科主任/护士长人数", 1, 1, false, false));
row.Data.Add(new Cell(5, "核算单元人员数量", 1, 1, false, false)); // row.Data.Add(new Cell(5, "核算单元人员数量", 1, 1, false, false));
row.Data.Add(new Cell(6, "预算比例", 1, 1, false, false)); // row.Data.Add(new Cell(6, "预算比例", 1, 1, false, false));
row.Data.Add(new Cell(7, "倾斜系数", 1, 1, false, false)); // row.Data.Add(new Cell(7, "倾斜系数", 1, 1, false, false));
row.Data.Add(new Cell(8, "规模绩效系数", 1, 1, false, false)); // row.Data.Add(new Cell(8, "规模绩效系数", 1, 1, false, false));
row.Data.Add(new Cell(9, "效率绩效系数", 1, 1, false, false)); // row.Data.Add(new Cell(9, "效率绩效系数", 1, 1, false, false));
row.Data.Add(new Cell(10, "管理绩效发放系数", 1, 1, false, false)); // row.Data.Add(new Cell(10, "管理绩效发放系数", 1, 1, false, false));
row.Data.Add(new Cell(11, "其他绩效1", 1, 1, false, false)); // row.Data.Add(new Cell(11, "其他绩效1", 1, 1, false, false));
row.Data.Add(new Cell(12, "考核得分率", 1, 1, false, false)); // row.Data.Add(new Cell(12, "考核得分率", 1, 1, false, false));
row.Data.Add(new Cell(13, "药占比奖罚", 1, 1, false, false)); // row.Data.Add(new Cell(13, "药占比奖罚", 1, 1, false, false));
row.Data.Add(new Cell(14, "材料占比奖罚", 1, 1, false, false)); // row.Data.Add(new Cell(14, "材料占比奖罚", 1, 1, false, false));
row.Data.Add(new Cell(15, "医院奖罚", 1, 1, false, false)); // row.Data.Add(new Cell(15, "医院奖罚", 1, 1, false, false));
row.Data.Add(new Cell(16, "其他绩效2", 1, 1, false, false)); // row.Data.Add(new Cell(16, "其他绩效2", 1, 1, false, false));
row.Data.Add(new Cell(17, "调节系数", 1, 1, false, false)); // row.Data.Add(new Cell(17, "调节系数", 1, 1, false, false));
response.Header.Add(row); // response.Header.Add(row);
for (int i = 0; i < list.Count(); i++) // for (int i = 0; i < list.Count(); i++)
{ // {
var item = list.ElementAt(i); // var item = list.ElementAt(i);
var rowbody = new Row(i); // var rowbody = new Row(i);
rowbody.Data.Add(new Cell(1, ((UnitType)item.UnitType).ToString(), 1, 1, false, false)); // rowbody.Data.Add(new Cell(1, ((UnitType)item.UnitType).ToString(), 1, 1, false, false));
rowbody.Data.Add(new Cell(2, item.DoctorAccountingUnit, 1, 1, false, false)); // rowbody.Data.Add(new Cell(2, item.DoctorAccountingUnit, 1, 1, false, false));
rowbody.Data.Add(new Cell(3, item.Department, 1, 1, false, false)); // rowbody.Data.Add(new Cell(3, item.Department, 1, 1, false, false));
rowbody.Data.Add(new Cell(4, item.DoctorDirectorNumber, 1, 1, false, true)); // rowbody.Data.Add(new Cell(4, item.DoctorDirectorNumber, 1, 1, false, true));
rowbody.Data.Add(new Cell(5, item.DoctorNumber, 1, 1, false, true)); // rowbody.Data.Add(new Cell(5, item.DoctorNumber, 1, 1, false, true));
rowbody.Data.Add(new Cell(6, item.DoctorBasicFactor, 1, 1, false, true)); // rowbody.Data.Add(new Cell(6, item.DoctorBasicFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(7, item.DoctorSlopeFactor, 1, 1, false, true)); // rowbody.Data.Add(new Cell(7, item.DoctorSlopeFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(8, item.DoctorScale, 1, 1, false, true)); // rowbody.Data.Add(new Cell(8, item.DoctorScale, 1, 1, false, true));
rowbody.Data.Add(new Cell(9, item.DoctorEffic, 1, 1, false, true)); // rowbody.Data.Add(new Cell(9, item.DoctorEffic, 1, 1, false, true));
rowbody.Data.Add(new Cell(10, item.DoctorGrant, 1, 1, false, true)); // rowbody.Data.Add(new Cell(10, item.DoctorGrant, 1, 1, false, true));
rowbody.Data.Add(new Cell(11, item.DoctorOtherPerfor1, 1, 1, false, true)); // rowbody.Data.Add(new Cell(11, item.DoctorOtherPerfor1, 1, 1, false, true));
rowbody.Data.Add(new Cell(12, item.DoctorScoringAverage, 1, 1, false, true)); // rowbody.Data.Add(new Cell(12, item.DoctorScoringAverage, 1, 1, false, true));
rowbody.Data.Add(new Cell(13, item.MedicineExtra, 1, 1, false, true)); // rowbody.Data.Add(new Cell(13, item.MedicineExtra, 1, 1, false, true));
rowbody.Data.Add(new Cell(14, item.MaterialsExtra, 1, 1, false, true)); // rowbody.Data.Add(new Cell(14, item.MaterialsExtra, 1, 1, false, true));
rowbody.Data.Add(new Cell(15, item.DoctorExtra, 1, 1, false, true)); // rowbody.Data.Add(new Cell(15, item.DoctorExtra, 1, 1, false, true));
rowbody.Data.Add(new Cell(16, item.DoctorOtherPerfor2, 1, 1, false, true)); // rowbody.Data.Add(new Cell(16, item.DoctorOtherPerfor2, 1, 1, false, true));
rowbody.Data.Add(new Cell(17, item.DoctorAdjustFactor, 1, 1, false, true)); // rowbody.Data.Add(new Cell(17, item.DoctorAdjustFactor, 1, 1, false, true));
response.Row.Add(rowbody); // response.Row.Add(rowbody);
} // }
} // }
} //}
private void EmployeeExport(int sheetID, SheetExportResponse response) private void EmployeeExport(int sheetID, SheetExportResponse response)
{ {
...@@ -475,14 +482,6 @@ private void EmployeeExport(int sheetID, SheetExportResponse response) ...@@ -475,14 +482,6 @@ private void EmployeeExport(int sheetID, SheetExportResponse response)
} }
response.Row.Add(rowbody); response.Row.Add(rowbody);
} }
var workDateIndex = pairs.IndexOf(("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"));
response.Row.ForEach(t =>
{
var workDate = t.Data.FirstOrDefault(f => f.PointCell == workDateIndex)?.CellValue;
if (workDate != null && workDate.ToString() != "")
t.Data.FirstOrDefault(f => f.PointCell == workDateIndex).CellValue = ((DateTime)workDate).ToString("yyyy-MM-dd");
});
} }
} }
...@@ -522,6 +521,42 @@ private void ClinicEmployeeExport(int sheetID, SheetExportResponse response) ...@@ -522,6 +521,42 @@ private void ClinicEmployeeExport(int sheetID, SheetExportResponse response)
} }
} }
private void LogisticsEmployeeExport(int sheetID, SheetExportResponse response)
{
var employeeList = _perforImemployeelogisticsRepository.GetEntities(t => t.SheetID == sheetID)?
.OrderByDescending(t => t.AccountType)
.ThenBy(t => t.AccountingUnit);
if (employeeList != null && employeeList.Count() > 0)
{
var pairs = PerSheetHeader.employeeLogisticsHeaders;
var row = new Row(0);
int index = 1;
foreach (var item in pairs)
{
row.Data.Add(new Cell(index, item.Item1, item.Item3, item.Item4, item.Item5, item.Item6, fieldName: item.Item8, cellType: "header"));
index += 1;
}
response.Header.Add(row);
for (int i = 0; i < employeeList.Count(); i++)
{
var employee = employeeList.ElementAt(i);
var rowbody = new Row(i);
index = 1;
foreach (var item in pairs)
{
if (item.Item7)
rowbody.Data.Add(new Cell(index, $"{item.Item2.Invoke(employee)}%", item.Item3, item.Item4, item.Item5, item.Item6, id: employee.ID, fieldName: item.Item8));
else
rowbody.Data.Add(new Cell(index, item.Item2.Invoke(employee), item.Item3, item.Item4, item.Item5, item.Item6, id: employee.ID, fieldName: item.Item8));
index += 1;
}
response.Row.Add(rowbody);
}
}
}
private void SpecialUnitExport(int sheetID, SheetExportResponse response) private void SpecialUnitExport(int sheetID, SheetExportResponse response)
{ {
var list = _perforImspecialunitRepository.GetEntities(t => t.SheetID == sheetID)?.OrderByDescending(t => t.AccountingUnit); var list = _perforImspecialunitRepository.GetEntities(t => t.SheetID == sheetID)?.OrderByDescending(t => t.AccountingUnit);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment