重新计算绩效

parent 716adc59
......@@ -158,6 +158,86 @@ public ApiResponse DeleteClinic([FromBody] im_employee_clinic request)
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>
......
......@@ -592,6 +592,34 @@
<param name="request"></param>
<returns></returns>
</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)">
<summary>
人事科修改参数后提交
......@@ -1190,7 +1218,7 @@
<param name="hospitalId"></param>
<returns></returns>
</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>
......
......@@ -130,6 +130,9 @@
<member name="P:Performance.EntityModels.PerformanceDbContext.im_employee_clinic">
<summary> </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.im_employee_logistics">
<summary> </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.im_header">
<summary> </summary>
</member>
......@@ -1846,11 +1849,6 @@
核算单元(护理组)
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.Department">
<summary>
科室
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.IncludeAvgCalculate">
<summary>
是否带入平均计算 是 否
......@@ -1876,11 +1874,6 @@
医生基础系数
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.DoctorSlopeFactor">
<summary>
倾斜系数
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.DoctorScale">
<summary>
规模绩效系数
......@@ -1916,11 +1909,6 @@
材料占比奖罚
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.DoctorExtra">
<summary>
医院奖罚
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.DoctorScoringAverage">
<summary>
考核对分率
......@@ -2306,6 +2294,11 @@
岗位系数
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_clinic.PermanentStaff">
<summary>
效率绩效人数
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_clinic.Efficiency">
<summary>
效率绩效系数
......@@ -2371,6 +2364,106 @@
</summary>
</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">
<summary>
......@@ -3816,11 +3909,6 @@
是否带入平均计算 是 否
</summary>
</member>
<member name="P:Performance.EntityModels.res_account.PermanentStaff">
<summary>
定科人数
</summary>
</member>
<member name="P:Performance.EntityModels.res_account.ManagerNumber">
<summary>
科主任/护士长数量
......
......@@ -110,37 +110,38 @@ public AutoMapperConfigs()
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.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.DoctorNumber, opt => opt.MapFrom(src => src.Number))
.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.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.DoctorAdjustFactor, opt => opt.MapFrom(src => src.AdjustFactor))
.ForMember(dest => dest.DoctorScale, opt => opt.MapFrom(src => src.Scale))
.ForMember(dest => dest.DoctorEffic, opt => opt.MapFrom(src => src.Effic))
.ForMember(dest => dest.DoctorGrant, opt => opt.MapFrom(src => src.Grant));
CreateMap<im_accountbasic, PerDataAccountBaisc>()
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => ((UnitType)src.UnitType).ToString()))
.ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.DoctorAccountingUnit))
.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
.ForMember(dest => dest.ManagerNumber, opt => opt.MapFrom(src => src.DoctorDirectorNumber))
.ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.DoctorNumber))
.ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.DoctorBasicFactor))
.ForMember(dest => dest.SlopeFactor, opt => opt.MapFrom(src => src.DoctorSlopeFactor))
.ForMember(dest => dest.OtherPerfor1, opt => opt.MapFrom(src => src.DoctorOtherPerfor1))
.ForMember(dest => dest.OtherPerfor2, opt => opt.MapFrom(src => src.DoctorOtherPerfor2))
.ForMember(dest => dest.Extra, opt => opt.MapFrom(src => src.DoctorExtra))
.ForMember(dest => dest.ScoringAverage, opt => opt.MapFrom(src => src.DoctorScoringAverage))
.ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.DoctorAdjustFactor))
.ForMember(dest => dest.Scale, opt => opt.MapFrom(src => src.DoctorScale))
.ForMember(dest => dest.Effic, opt => opt.MapFrom(src => src.DoctorEffic))
.ForMember(dest => dest.Grant, opt => opt.MapFrom(src => src.DoctorGrant));
.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()))
// .ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.DoctorAccountingUnit))
// .ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
// .ForMember(dest => dest.ManagerNumber, opt => opt.MapFrom(src => src.DoctorDirectorNumber))
// .ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.DoctorNumber))
// .ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.DoctorBasicFactor))
// .ForMember(dest => dest.SlopeFactor, opt => opt.MapFrom(src => src.DoctorSlopeFactor))
// .ForMember(dest => dest.OtherPerfor1, opt => opt.MapFrom(src => src.DoctorOtherPerfor1))
// .ForMember(dest => dest.OtherPerfor2, opt => opt.MapFrom(src => src.DoctorOtherPerfor2))
// .ForMember(dest => dest.Extra, opt => opt.MapFrom(src => src.DoctorExtra))
// .ForMember(dest => dest.ScoringAverage, opt => opt.MapFrom(src => src.DoctorScoringAverage))
// .ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.DoctorAdjustFactor))
// .ForMember(dest => dest.Scale, opt => opt.MapFrom(src => src.DoctorScale))
// .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<PerDataAccountDoctor, res_accountdoctor>();
......@@ -196,12 +197,17 @@ public AutoMapperConfigs()
CreateMap<ag_temp, SecondTempResponse>();
CreateMap<ag_secondallot, SecondListResponse>().ReverseMap();
CreateMap<im_employee_clinic, PerDataClinicEmployee>().ReverseMap();
CreateMap<im_employee_clinic, PerDataClinicEmployee>().ReverseMap();
CreateMap<im_employee_clinic, ComputeEmployee>()
.ForMember(dest => dest.JobNumber, opt => opt.MapFrom(src => src.PersonnelNumber))
.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>()
.ForMember(dest => dest.Type, opt => opt.MapFrom(src => 1));
CreateMap<BudgetResponse, per_budget_amount>();
......
......@@ -67,9 +67,14 @@ public class ComputeEmployee
public Nullable<decimal> PostCoefficient { get; set; }
/// <summary>
/// 参加工作时间
/// 效率绩效人数
/// </summary>
public Nullable<DateTime> WorkTime { get; set; }
public Nullable<decimal> PermanentStaff { get; set; }
///// <summary>
///// 参加工作时间
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 考核得分率
......@@ -96,10 +101,10 @@ public class ComputeEmployee
/// </summary>
public Nullable<decimal> OtherPerfor { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public Nullable<decimal> Punishment { get; set; }
///// <summary>
///// 医院奖罚
///// </summary>
//public Nullable<decimal> Punishment { get; set; }
/// <summary>
/// 调节系数
......
......@@ -81,7 +81,7 @@ public class ComputeResult
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 医院奖罚(来自人员名单)
/// 医院奖罚 来自5.2
/// </summary>
public Nullable<decimal> Punishment { get; set; }
......@@ -100,20 +100,20 @@ public class ComputeResult
/// </summary>
public Nullable<decimal> BaiscNormPerforTotal { get; set; }
/// <summary>
/// 参加工作时间(来自人员名单)
/// </summary>
public Nullable<DateTime> WorkTime { get; set; }
///// <summary>
///// 参加工作时间(来自人员名单)
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 绩效基础金额(计算)
/// </summary>
public Nullable<decimal> BaiscNormValue { get; set; }
/// <summary>
/// 年资系数(来自人员名单)
/// </summary>
public Nullable<decimal> WorkYear { get; set; }
///// <summary>
///// 年资系数(来自人员名单)
///// </summary>
//public Nullable<decimal> WorkYear { get; set; }
/// <summary>
/// 实发绩效
......
......@@ -40,8 +40,8 @@ public enum SheetType
/// <summary> 无法识别 </summary>
[Description("无法识别")]
Unidentifiable = 1,
/// <summary> 医院人员名单 </summary>
[Description("医院人员名单")]
/// <summary> 行政中高层 </summary>
[Description("行政中高层")]
Employee = 2,
/// <summary> 收入 </summary>
[Description("收入")]
......@@ -81,17 +81,33 @@ public enum SheetType
[Description("临床科室护士绩效测算表")]
ComputeNurseAccount = 14,
/// <summary> 临床人员名单 </summary>
[Description("临床人员名单")]
/// <summary> 业务中层 </summary>
[Description("业务中层")]
ClinicEmployee = 15,
/// <summary> 特殊临床科室医护绩效测算基础 </summary>
[Description("特殊临床科室医护绩效测算基础")]
AccountBasicSpecial = 16,
/// <summary> 科室绩效医院奖罚 </summary>
[Description("科室绩效医院奖罚")]
AccountExtra = 17,
/// <summary> 临床科室医护绩效考核表 </summary>
[Description("临床科室医护绩效考核表")]
AccountAssess = 17,
/// <summary> 业务中层行政中高层医院奖罚 </summary>
[Description("业务中层行政中高层医院奖罚")]
PersonExtra = 18,
/// <summary> 科室药占比考核 </summary>
[Description("科室药占比考核")]
AccountDrugAssess = 19,
/// <summary> 科室材料考核 </summary>
[Description("科室材料考核")]
AccountMaterialsAssess = 20,
/// <summary> 行政后勤 </summary>
[Description("行政后勤")]
LogisticsEmployee = 21,
}
/// <summary>
......
......@@ -23,6 +23,14 @@ public class PerData : IPerData
/// </summary>
public string TypeName { get; set; }
/// <summary>
/// 人员姓名
/// </summary>
public string EmployeeName { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public string JobNumber { get; set; }
/// <summary>
/// 单元格注释
/// </summary>
public string Annotation { get; set; }
......
......@@ -28,15 +28,15 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string Department { get; set; }
///// <summary>
///// 科室名称
///// </summary>
//public string Department { get; set; }
/// <summary>
/// 定科人数
/// </summary>
public decimal PermanentStaff { get; set; }
///// <summary>
///// 效率绩效人数
///// </summary>
//public decimal PermanentStaff { get; set; }
/// <summary>
/// 科主任/护士长数量
......@@ -53,10 +53,10 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public decimal BasicFactor { get; set; }
/// <summary>
/// 倾斜系数
/// </summary>
public decimal SlopeFactor { get; set; }
///// <summary>
///// 倾斜系数
///// </summary>
//public decimal SlopeFactor { get; set; }
/// <summary>
/// 其他绩效1
......@@ -78,10 +78,10 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public decimal MaterialsExtra { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public decimal Extra { get; set; }
///// <summary>
///// 医院奖罚
///// </summary>
//public decimal Extra { get; set; }
/// <summary>
/// 考核对分率
......@@ -108,20 +108,20 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public decimal Grant { get; set; }
/// <summary>
/// 保底绩效参考标准
/// </summary>
public string MinimumReference { get; set; }
///// <summary>
///// 保底绩效参考标准
///// </summary>
//public string MinimumReference { get; set; }
/// <summary>
/// 保底绩效系数
/// </summary>
public Nullable<decimal> MinimumFactor { get; set; }
///// <summary>
///// 保底绩效系数
///// </summary>
//public Nullable<decimal> MinimumFactor { get; set; }
/// <summary>
/// 工作量倾斜系数
/// </summary>
public Nullable<decimal> WorkSlopeFactor { get; set; }
///// <summary>
///// 工作量倾斜系数
///// </summary>
//public Nullable<decimal> WorkSlopeFactor { get; set; }
#endregion
......@@ -132,10 +132,10 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public Nullable<decimal> MedicineFactor { get; set; }
/// <summary>
/// 保底绩效金额
/// </summary>
public Nullable<decimal> MinimumFee { get; set; }
///// <summary>
///// 保底绩效金额
///// </summary>
//public Nullable<decimal> MinimumFee { get; set; }
/// <summary>
/// 科室业绩
......
......@@ -42,9 +42,14 @@ public class PerDataClinicEmployee : IPerData
public Nullable<decimal> Basics { get; set; }
/// <summary>
/// 岗位系
/// 效率绩效人
/// </summary>
public Nullable<decimal> PostCoefficient { get; set; }
public decimal PermanentStaff { get; set; }
///// <summary>
///// 岗位系数
///// </summary>
//public Nullable<decimal> PostCoefficient { get; set; }
/// <summary>
/// 效率绩效系数
......@@ -61,10 +66,10 @@ public class PerDataClinicEmployee : IPerData
/// </summary>
public Nullable<decimal> Management { get; set; }
/// <summary>
/// 参加工作时间
/// </summary>
public Nullable<DateTime> WorkTime { get; set; }
///// <summary>
///// 参加工作时间
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 考核得分率
......@@ -77,14 +82,19 @@ public class PerDataClinicEmployee : IPerData
public Nullable<decimal> Attendance { get; set; }
/// <summary>
/// 其他绩效
/// 其他管理绩效
/// </summary>
public Nullable<decimal> OthePerfor { get; set; }
public Nullable<decimal> OtheManagementPerfor { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public Nullable<decimal> Punishment { get; set; }
///// <summary>
///// 其他绩效
///// </summary>
//public Nullable<decimal> OthePerfor { get; set; }
///// <summary>
///// 医院奖罚
///// </summary>
//public Nullable<decimal> Punishment { get; set; }
/// <summary>
/// 调节系数
......
......@@ -56,10 +56,10 @@ public class PerDataEmployee : IPerData
/// </summary>
public Nullable<decimal> PostCoefficient { get; set; }
/// <summary>
/// 参加工作时间
/// </summary>
public Nullable<DateTime> WorkTime { get; set; }
///// <summary>
///// 参加工作时间
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 考核得分率
......@@ -76,15 +76,15 @@ public class PerDataEmployee : IPerData
///// </summary>
//public Nullable<decimal> Workload { get; set; }
/// <summary>
/// 其他绩效
/// </summary>
public Nullable<decimal> OthePerfor { get; set; }
///// <summary>
///// 其他绩效
///// </summary>
//public Nullable<decimal> OthePerfor { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public Nullable<decimal> Punishment { get; set; }
///// <summary>
///// 医院奖罚
///// </summary>
//public Nullable<decimal> Punishment { get; set; }
/// <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
/// </summary>
public Nullable<decimal> QuantitativeIndicatorsValue { get; set; }
/// <summary>
/// 考核得分率
/// </summary>
public Nullable<decimal> ScoringAverage { get; set; }
///// <summary>
///// 考核得分率
///// </summary>
//public Nullable<decimal> ScoringAverage { get; set; }
/// <summary>
/// 其他绩效
/// </summary>
public Nullable<decimal> OtherPerfor { get; set; }
///// <summary>
///// 其他绩效
///// </summary>
//public Nullable<decimal> OtherPerfor { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public Nullable<decimal> Punishment { get; set; }
///// <summary>
///// 医院奖罚
///// </summary>
//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; }
/// <summary>
......
......@@ -11,22 +11,22 @@ public class PerSheetHeader
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)>
{
("核算单元类型", (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.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.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) => 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) => 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"),
//("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"),
};
......@@ -38,18 +38,42 @@ public class PerSheetHeader
("核算单元", (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.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"),
("职务分类", (t) => t.JobTitle, 1, 1, false, true, false, "JobTitle"),
//("岗位系数", (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.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.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.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"),
};
// 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, 是否含有%
public static List<(string, Func<im_specialunit, object>, int, int, bool, bool, bool, string)> specialUnitHeaders =
......@@ -61,10 +85,10 @@ public class PerSheetHeader
("量化指标", (t) => t.QuantitativeIndicators, 1, 1, false, true, false, "QuantitativeIndicators"),
("数量", (t) => t.Quantity, 1, 1, false, true, false, "Quantity"),
("量化指标绩效分值", (t) => t.QuantitativeIndicatorsValue, 1, 1, false, true, false, "QuantitativeIndicatorsValue"),
("考核得分率", (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.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.ScoringAverage.Value * 100, 2), 1, 1, false, true, true, "ScoringAverage"),
//("其他绩效", (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"),
};
}
}
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)
/// <summary> </summary>
public virtual DbSet<im_employee_clinic> im_employee_clinic { get; set; }
/// <summary> </summary>
public virtual DbSet<im_employee_logistics> im_employee_logistics { get; set; }
/// <summary> </summary>
public virtual DbSet<im_header> im_header { get; set; }
/// <summary> 特殊科室核算 </summary>
public virtual DbSet<im_specialunit> im_specialunit { get; set; }
......
......@@ -46,10 +46,10 @@ public class im_accountbasic
/// </summary>
public string NurseAccountingUnit { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
///// <summary>
///// 科室
///// </summary>
//public string Department { get; set; }
/// <summary>
/// 是否带入平均计算 是 否
......@@ -76,10 +76,10 @@ public class im_accountbasic
/// </summary>
public Nullable<decimal> DoctorBasicFactor { get; set; }
/// <summary>
/// 倾斜系数
/// </summary>
public Nullable<decimal> DoctorSlopeFactor { get; set; }
///// <summary>
///// 倾斜系数
///// </summary>
//public Nullable<decimal> DoctorSlopeFactor { get; set; }
/// <summary>
/// 规模绩效系数
......@@ -116,10 +116,10 @@ public class im_accountbasic
/// </summary>
public Nullable<decimal> MaterialsExtra { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public Nullable<decimal> DoctorExtra { get; set; }
///// <summary>
///// 医院奖罚
///// </summary>
//public Nullable<decimal> DoctorExtra { get; set; }
/// <summary>
/// 考核对分率
......
......@@ -7,135 +7,140 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("im_employee_clinic")]
public class im_employee_clinic
public class im_employee_clinic
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
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 UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string Department { 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> Basics { get; set; }
/// <summary>
/// 岗位系数
/// </summary>
public Nullable<decimal> PostCoefficient { get; set; }
/// <summary>
/// 效率绩效人数
/// </summary>
public Nullable<decimal> PermanentStaff { get; set; }
/// <summary>
/// 效率绩效系数
/// </summary>
public Nullable<decimal> Efficiency { get; set; }
/// <summary>
/// 规模绩效系数
/// </summary>
public Nullable<decimal> Scale { get; set; }
/// <summary>
/// 管理绩效发放系数
/// </summary>
public Nullable<decimal> Management { 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>
......
//-----------------------------------------------------------------------
// <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
/// </summary>
public string IncludeAvgCalculate { get; set; }
/// <summary>
/// 定科人数
/// </summary>
public Nullable<decimal> PermanentStaff { get; set; }
///// <summary>
///// 定科人数
///// </summary>
//public Nullable<decimal> PermanentStaff { get; set; }
/// <summary>
/// 科主任/护士长数量
......
......@@ -25,6 +25,7 @@ public int DeleteData(int allotId)
"im_data",
"im_employee",
"im_employee_clinic",
"im_employee_logistics",
"im_header",
"im_specialunit",
"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)
{
}
}
}
......@@ -29,6 +29,7 @@ public class ImportDataService : IAutoInjection
private PerforImaccountbasicRepository perforImaccountbasicRepository;
private PerforImspecialunitRepository perforImspecialunitRepository;
private PerforImemployeeclinicRepository perforImemployeeclinicRepository;
private PerforImemployeelogisticsRepository perforImemployeelogisticsRepository;
//private PerforLogdbugRepository logdbug;
private readonly LogManageService logManageService;
private ILogger<ImportDataService> logger;
......@@ -42,6 +43,7 @@ public class ImportDataService : IAutoInjection
PerforImaccountbasicRepository perforImaccountbasicRepository,
PerforImspecialunitRepository perforImspecialunitRepository,
PerforImemployeeclinicRepository perforImemployeeclinicRepository,
PerforImemployeelogisticsRepository perforImemployeelogisticsRepository,
//PerforLogdbugRepository logdbug
LogManageService logManageService,
ILogger<ImportDataService> logger)
......@@ -55,6 +57,7 @@ public class ImportDataService : IAutoInjection
this.perforImaccountbasicRepository = perforImaccountbasicRepository;
this.perforImspecialunitRepository = perforImspecialunitRepository;
this.perforImemployeeclinicRepository = perforImemployeeclinicRepository;
this.perforImemployeelogisticsRepository = perforImemployeelogisticsRepository;
//this.logdbug = logdbug;
this.logManageService = logManageService;
this.logger = logger;
......@@ -164,7 +167,7 @@ private void SaveEmployee(PerSheet sheet, int allotId)
var imdata = Mapper.Map<im_employee>(data);
imdata.SheetID = imsheet.ID;
imdata.AllotID = allotId;
imdata.OtherPerfor = data.OthePerfor;
//imdata.OtherPerfor = data.OthePerfor;
addList.Add(imdata);
}
perforImEmployeeRepository.AddRange(addList.ToArray());
......@@ -203,13 +206,52 @@ private void SaveClinicEmployee(PerSheet sheet, int allotId)
var imdata = Mapper.Map<im_employee_clinic>(data);
imdata.SheetID = imsheet.ID;
imdata.AllotID = allotId;
imdata.OtherPerfor = data.OthePerfor;
//imdata.OtherPerfor = data.OthePerfor;
addList.Add(imdata);
}
perforImemployeeclinicRepository.AddRange(addList.ToArray());
}
/// <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>
/// <param name="sheet"></param>
......@@ -345,6 +387,10 @@ private bool Save(PerExcel excel, int allotId)
{
SaveEmployee(sheet, allotId);
}
else if (sheet.SheetType == SheetType.LogisticsEmployee)
{
SaveLogisticsEmployee(sheet, allotId);
}
else if (sheet.SheetType == SheetType.ClinicEmployee)
{
SaveClinicEmployee(sheet, allotId);
......
......@@ -292,13 +292,13 @@ public void Generate(per_allot allot, string mail)
excel = importDataService.ReadDataAndSave(allot);
UpdateAllotStates(allot.ID, (int)AllotStates.InCheckData, EnumHelper.GetDescription(AllotStates.InCheckData));
if (!checkDataService.Check(excel, allot))
{
UpdateAllotStates(allot.ID, (int)AllotStates.CheckFail, EnumHelper.GetDescription(AllotStates.CheckFail));
//SendEmail(allot, mail, 3, time);
logManageService.WriteMsg("绩效数据校验失败", "详情可至“更多 -- 查看日志”查看", 3, allot.ID, "ReceiveMessage", true);
return;
}
//if (!checkDataService.Check(excel, allot))
//{
// UpdateAllotStates(allot.ID, (int)AllotStates.CheckFail, EnumHelper.GetDescription(AllotStates.CheckFail));
// //SendEmail(allot, mail, 3, time);
// logManageService.WriteMsg("绩效数据校验失败", "详情可至“更多 -- 查看日志”查看", 3, allot.ID, "ReceiveMessage", true);
// return;
//}
}
UpdateAllotStates(allot.ID, (int)AllotStates.InGenerate, EnumHelper.GetDescription(AllotStates.InGenerate));
......@@ -315,45 +315,63 @@ public void Generate(per_allot allot, string mail)
var (list, mergeSheets) = processComputService.MergeCompute(excel, allot.ID);
processComputService.Save(list, allot.ID);
//计算保底绩效参考标准(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)
logManageService.WriteMsg("计算保底绩效参考标准值", "正在保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效", 1, allot.ID, "ReceiveMessage", true);
var minimumBaiscnorm = processComputService.ComputeMinimum(excel, mergeSheets, allot.ID);
////计算保底绩效参考标准(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)
//logManageService.WriteMsg("计算保底绩效参考标准值", "正在保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效", 1, allot.ID, "ReceiveMessage", true);
//var minimumBaiscnorm = processComputService.ComputeMinimum(excel, mergeSheets, allot.ID);
//计算科室业绩(含保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)保底绩效
logManageService.WriteMsg("计算保底绩效参考标准值", "计算科室业绩", 1, allot.ID, "ReceiveMessage", true);
var sheet = processComputService.Compute(excel, mergeSheets, minimumBaiscnorm, true);
////计算科室业绩(含保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)保底绩效
//logManageService.WriteMsg("计算保底绩效参考标准值", "计算科室业绩", 1, allot.ID, "ReceiveMessage", true);
//var sheet = processComputService.Compute(excel, mergeSheets, minimumBaiscnorm, true);
//计算科室自定义保底绩效范围
logManageService.WriteMsg("计算保底绩效参考标准值", "正在计算科室自定义保底绩效范围", 1, allot.ID, "ReceiveMessage", true);
processComputService.ComputeCustomMinimum(excel, mergeSheets, minimumBaiscnorm, allot.ID);
////计算科室自定义保底绩效范围
//logManageService.WriteMsg("计算保底绩效参考标准值", "正在计算科室自定义保底绩效范围", 1, allot.ID, "ReceiveMessage", true);
//processComputService.ComputeCustomMinimum(excel, mergeSheets, minimumBaiscnorm, allot.ID);
//计算各人群人均保底绩效
logManageService.WriteMsg("计算保底绩效参考标准值", "正在生成保底绩效行政工勤人均绩效", 1, allot.ID, "ReceiveMessage", true);
var minimumBaiscnorm2 = resultComputeService.Compute(allot, excel, sheet, true);
if (minimumBaiscnorm2 != null && minimumBaiscnorm2.Any(t => t.PositionName == EnumHelper.GetDescription(PerforType.行政工勤)))
{
var minimum = minimumBaiscnorm2.First(t => t.PositionName == EnumHelper.GetDescription(PerforType.行政工勤));
minimum.PositionName = EnumHelper.GetDescription(MinimumType.保底工勤);
minimumBaiscnorm.Add(minimum);
}
////计算各人群人均保底绩效
//logManageService.WriteMsg("计算保底绩效参考标准值", "正在生成保底绩效行政工勤人均绩效", 1, allot.ID, "ReceiveMessage", true);
//var minimumBaiscnorm2 = resultComputeService.Compute(allot, excel, sheet, true);
//if (minimumBaiscnorm2 != null && minimumBaiscnorm2.Any(t => t.PositionName == EnumHelper.GetDescription(PerforType.行政工勤)))
//{
// var minimum = minimumBaiscnorm2.First(t => t.PositionName == EnumHelper.GetDescription(PerforType.行政工勤));
// minimum.PositionName = EnumHelper.GetDescription(MinimumType.保底工勤);
// minimumBaiscnorm.Add(minimum);
//}
////保存 保底绩效参考标准
//logManageService.WriteMsg("计算保底绩效参考标准值", "保存保底绩效参考标准", 1, allot.ID, "ReceiveMessage", true);
//perforResbaiscnormRepository.AddRange(minimumBaiscnorm.ToArray());
//保存 保底绩效参考标准
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);
//var accountExtras = processComputService.GetAccountExtra(excel);
////科室材料考核
//logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
//var accountExtras = processComputService.GetAccountExtra(excel);
//重新计算科室业绩(含所有提供保底金额)
logManageService.WriteMsg("正在生成绩效", "重新计算科室业绩,包含所有保底金额计算科室业绩", 1, allot.ID, "ReceiveMessage", true);
var sheetLast = processComputService.Compute(excel, mergeSheets, minimumBaiscnorm);
logManageService.WriteMsg("正在生成绩效", "计算科室业绩分", 1, allot.ID, "ReceiveMessage", true);
var sheetLast = processComputService.Compute(excel, mergeSheets, accountExtras);
//保存计算过程数据
logManageService.WriteMsg("正在生成绩效", "保存科室业绩结果及计算过程中产生的数据", 1, allot.ID, "ReceiveMessage", true);
processComputService.Save(sheetLast, allot.ID);
//业务中层行政中高层医院奖罚
logManageService.WriteMsg("正在生成绩效", "业务中层行政中高层医院奖罚", 1, allot.ID, "ReceiveMessage", true);
var employeeExtra = processComputService.GetEmployeeExtra(excel);
// 计算最总数据
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);
resultComputeService.SpecialUnitCompute(excel, allot, baiscnormList);
resultComputeService.SpecialUnitCompute(excel, allot, sheetLast, baiscnormList, accountExtras, employeeExtra);
logManageService.WriteMsg("正在生成绩效", "保存最终特殊科室绩效数据", 1, allot.ID, "ReceiveMessage", true);
//保存 绩效人均参考标准
......@@ -376,7 +394,7 @@ public void Generate(per_allot allot, string mail)
}
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);
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateFail, EnumHelper.GetDescription(AllotStates.GenerateFail));
//SendEmail(allot, mail, 2, time);
......
......@@ -347,10 +347,12 @@ public List<TitleValue> Department(AssessRequest request)
var result = new List<TitleValue>();
//取到该家医院下所有科室
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)
{
//自己选的
var _checked = perforAsdataRepository.GetEntities(t => t.AssessID == request.AssessID)?.Select(t => t.Department).ToList();
if (_checked != null && _checked.Count > 0)
......
......@@ -569,7 +569,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
int groupbasis = 1;
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)
{
if (type == 3 && stype == (int)SheetType.Workload) type = 1;
......@@ -597,7 +597,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
sheettype = 3;
amount = doctor.WorkloadFee ?? 0m;
}
else if (sheet.SheetType == (int)SheetType.AccountAssess)
else if (sheet.SheetType == (int)SheetType.AccountExtra)
{
sheettype = 5;
amount = sheetData.Sum(t => t.CellValue ?? 0m);
......@@ -762,7 +762,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
{
UnitType = second.UnitType,
AccountingUnit = second.Department,
Department = second.Department,
//Department = second.Department,
ScoringAverage = special.First().ScoringAverage.Value,
OtherPerfor1 = special.First().OtherPerfor.Value,
AdjustFactor = special.First().Adjust.Value,
......@@ -772,7 +772,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
PerforFee = special.First().GiveFee,
PerforTotal = special.First().ResultsTotalFee,
Income = special.First().ResultsTotalFee,
Extra = special.First().Punishment.Value,
//Extra = special.First().Punishment.Value,
},
Detail = new List<DetailDtos>(),
};
......
......@@ -26,6 +26,7 @@ public class EmployeeService : IAutoInjection
private PerforUserhospitalRepository perforUserhospitalRepository;
private PerforPerallotRepository perallotRepository;
private PerforPerapramountRepository perapramountRepository;
private PerforImemployeelogisticsRepository perforImemployeelogisticsRepository;
private ILogger<EmployeeService> logger;
public EmployeeService(PerforImemployeeRepository perforImemployeeRepository,
......@@ -35,6 +36,7 @@ public class EmployeeService : IAutoInjection
PerforUserhospitalRepository perforUserhospitalRepository,
PerforPerallotRepository perallotRepository,
PerforPerapramountRepository perapramountRepository,
PerforImemployeelogisticsRepository perforImemployeelogisticsRepository,
ILogger<EmployeeService> logger)
{
this.perforImemployeeRepository = perforImemployeeRepository;
......@@ -44,6 +46,7 @@ public class EmployeeService : IAutoInjection
this.perforUserhospitalRepository = perforUserhospitalRepository;
this.perallotRepository = perallotRepository;
this.perapramountRepository = perapramountRepository;
this.perforImemployeelogisticsRepository = perforImemployeelogisticsRepository;
this.logger = logger;
}
......@@ -257,6 +260,103 @@ public bool DeleteClinic(im_employee_clinic request)
#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>
......
......@@ -177,12 +177,12 @@ private bool EditAccountBasic(int userId, OriginalRequest request)
{
{ "核算单元类型", nameof(im_accountbasic.UnitType) },
{ "核算单元", nameof(im_accountbasic.DoctorAccountingUnit) },
{ "科室名称", nameof(im_accountbasic.Department) },
//{ "科室名称", nameof(im_accountbasic.Department) },
{ "效率绩效人数", nameof(im_accountbasic.PermanentStaff) },
{ "科主任/护士长人数", nameof(im_accountbasic.DoctorDirectorNumber) },
{ "核算单元人员数量", nameof(im_accountbasic.DoctorNumber) },
{ "预算比例", nameof(im_accountbasic.DoctorBasicFactor) },
{ "倾斜系数", nameof(im_accountbasic.DoctorSlopeFactor) },
//{ "倾斜系数", nameof(im_accountbasic.DoctorSlopeFactor) },
{ "工作量倾斜系数", nameof(im_accountbasic.WorkSlopeFactor) },
{ "保底绩效参考标准", nameof(im_accountbasic.MinimumReference) },
{ "保底绩效系数", nameof(im_accountbasic.MinimumFactor) },
......@@ -198,8 +198,7 @@ private bool EditAccountBasic(int userId, OriginalRequest request)
if (imdata == null || request.Cell == null || !accdict.ContainsKey(request.Cell.FieldName))
return false;
var basic = imaccountbasicRepository.GetEntity(t => t.SheetID == request.SheetId && t.Department == imdata.Department
&& t.DoctorAccountingUnit == imdata.AccountingUnit && t.UnitType == imdata.UnitType);
var basic = imaccountbasicRepository.GetEntity(t => t.SheetID == request.SheetId && t.DoctorAccountingUnit == imdata.AccountingUnit && t.UnitType == imdata.UnitType);
if (basic == null) return false;
if (request.Cell.FieldName == "核算单元类型")
......
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using Performance.DtoModels;
using Performance.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace Performance.Services
{
public class NopiSevice
public static class NopiSevice
{
public static string GetCellStringValue(ICell cell)
{
......@@ -57,6 +59,43 @@ public static string GetCellStringValue(ICell cell)
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)
{
if (cell != null)
......
......@@ -53,8 +53,24 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa
case SheetType.AccountBasicSpecial:
dataread = new PerSheetDataReadDeptAccountingSpecial();
break;
case SheetType.AccountAssess:
dataread = new PerSheetDataReadAccountAssess();
case SheetType.AccountExtra:
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;
}
return dataread;
......
......@@ -78,10 +78,12 @@ public PerSheet Sheet(ISheet sheet, bool isnew)
/// <returns></returns>
public SheetType GetSheetType(string sheetName)
{
if (sheetName.StartsWith("行政人员名单"))
if (sheetName.StartsWith("行政中高层"))
return SheetType.Employee;
else if (sheetName.StartsWith("业务中层"))
return SheetType.ClinicEmployee;
else if (sheetName.StartsWith("行政后勤"))
return SheetType.LogisticsEmployee;
else if (sheetName.StartsWith("1.0"))
return SheetType.OtherIncome;
else if (sheetName.StartsWith("1."))
......@@ -95,7 +97,13 @@ public SheetType GetSheetType(string sheetName)
else if (sheetName.StartsWith("4.2"))
return SheetType.SpecialUnit;
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;
}
}
......
......@@ -8,7 +8,10 @@
namespace Performance.Services
{
public class PerSheetDataReadAccountAssess : IPerSheetDataRead
/// <summary>
/// 科室奖罚
/// </summary>
public class PerSheetDataReadAccountExtra : IPerSheetDataRead
{
public PerSheetPoint Point => new PerSheetPoint
{
......
......@@ -30,14 +30,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
"医生姓名",
"职务分类",
"基础绩效系数",
"岗位系数",
//"岗位系数",
"效率绩效人数",
"效率绩效系数",
"规模绩效系数",
"管理绩效发放系数",
"考核得分率",
"出勤率",
"其他绩效",
"医院奖罚",
"其他管理绩效",
//"其他绩效",
//"医院奖罚",
"调节系数",
};
foreach (var item in headers)
......@@ -60,21 +62,23 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
DoctorName = 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),
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),
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),
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),
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),
//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),
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),
};
if (!string.IsNullOrEmpty(clinicEmployee.UnitType) && !string.IsNullOrEmpty(clinicEmployee.DoctorName))
dataList.Add(clinicEmployee);
}
if (!string.IsNullOrEmpty(clinicEmployee.UnitType) && !string.IsNullOrEmpty(clinicEmployee.DoctorName))
dataList.Add(clinicEmployee);
}
return dataList;
}
}
}
}
......@@ -28,20 +28,20 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
"核算单元类型",
"核算单元",
"科室名称",
"效率绩效人数",
//"科室名称",
//"效率绩效人数",
"科主任/护士长人数",
"核算单元人员数量",
"预算比例",
"倾斜系数",
"工作量倾斜系数",
"保底绩效参考标准",
"保底绩效系数",
"其他绩效1",
"其他绩效2",
"药占比奖罚",
"材料占比奖罚",
"医院奖罚",
//"倾斜系数",
//"工作量倾斜系数",
//"保底绩效参考标准",
//"保底绩效系数",
//"其他绩效1",
//"其他绩效2",
//"药占比奖罚",
//"材料占比奖罚",
//"医院奖罚",
"考核得分率",
"调节系数",
};
......@@ -59,23 +59,23 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
unifyUnit.RowNumber = r;
unifyUnit.UnitType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元类型").PointCell)?.StringCellValue;
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.PermanentStaff = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效人数").PointCell)?.NumericCellValue);
//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.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.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.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.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.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.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.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.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.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.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.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.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);
......
......@@ -9,7 +9,7 @@
namespace Performance.Services
{
/// <summary>
/// 人员读取
/// 行政中高层
/// </summary>
public class PerSheetDataReadEmployee : IPerSheetDataRead
{
......@@ -35,11 +35,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
"绩效基数核算系数",
"人员分类",
"岗位系数",
"参加工作时间",
//"参加工作时间",
"考核得分率",
"出勤率",
"其他绩效",
"医院奖罚",
//"其他绩效",
//"医院奖罚",
"调节系数",
};
foreach (var item in headers)
......@@ -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),
AccountType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人员分类").PointCell)?.StringCellValue,
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),
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()),
//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),
Punishment = 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),
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()),
};
......
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)
"量化指标绩效分值",
"科室",
"人数",
"考核得分率",
"其他绩效",
"医院奖罚",
"调节系数",
//"考核得分率",
//"其他绩效",
//"医院奖罚",
//"调节系数",
};
foreach (var item in headers)
{
......@@ -73,10 +73,10 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
specialUnit.AccountingUnit = accountingUnit;
specialUnit.Department = accountingUnit;
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.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.Adjust = 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.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);
//}
if (!string.IsNullOrEmpty(specialUnit.QuantitativeIndicators) && specialUnit.QuantitativeIndicatorsValue != null)
dataList.Add(specialUnit);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment