科室详情BUG修复及医院奖罚恢复

parent 95de7014
...@@ -188,8 +188,6 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody] A ...@@ -188,8 +188,6 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody] A
logManageService.WriteMsg("等待绩效生成", $"等待绩效生成{allot.Year}-{allot.Month.ToString().PadLeft(2, '0')}月份绩效!", 1, allot.ID, "ReceiveMessage"); logManageService.WriteMsg("等待绩效生成", $"等待绩效生成{allot.Year}-{allot.Month.ToString().PadLeft(2, '0')}月份绩效!", 1, allot.ID, "ReceiveMessage");
//_allotService.Generate(allot, email); //_allotService.Generate(allot, email);
////BackgroundJob.Enqueue(() => _allotService.Generate(allot, email)); ////BackgroundJob.Enqueue(() => _allotService.Generate(allot, email));
// 科室下发
resultComputeService.GenerateSecondAllot(allot);
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
} }
...@@ -271,6 +269,8 @@ public ApiResponse Issued([FromBody] AllotRequest request) ...@@ -271,6 +269,8 @@ public ApiResponse Issued([FromBody] AllotRequest request)
if (null == allot) if (null == allot)
throw new PerformanceException("当前绩效记录不存在"); throw new PerformanceException("当前绩效记录不存在");
_allotService.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed)); _allotService.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed));
// 科室下发
resultComputeService.GenerateSecondAllot(allot);
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
} }
......
...@@ -499,6 +499,11 @@ ...@@ -499,6 +499,11 @@
其他绩效 其他绩效
</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>
调节系数 调节系数
...@@ -1160,6 +1165,11 @@ ...@@ -1160,6 +1165,11 @@
其他绩效 其他绩效
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataClinicEmployee.Punishment">
<summary>
医院奖罚
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataClinicEmployee.Adjust"> <member name="P:Performance.DtoModels.PerDataClinicEmployee.Adjust">
<summary> <summary>
调节系数 调节系数
...@@ -1250,6 +1260,11 @@ ...@@ -1250,6 +1260,11 @@
出勤率 出勤率
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataEmployee.Punishment">
<summary>
医院奖罚
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataEmployee.Adjust"> <member name="P:Performance.DtoModels.PerDataEmployee.Adjust">
<summary> <summary>
调节系数 调节系数
......
...@@ -121,10 +121,10 @@ public class ComputeEmployee ...@@ -121,10 +121,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>
/// 调节系数 /// 调节系数
......
...@@ -111,10 +111,10 @@ public class PerDataClinicEmployee : IPerData ...@@ -111,10 +111,10 @@ public class PerDataClinicEmployee : IPerData
///// </summary> ///// </summary>
//public Nullable<decimal> NightWorkPerfor { get; set; } //public Nullable<decimal> NightWorkPerfor { get; set; }
///// <summary> /// <summary>
///// 医院奖罚 /// 医院奖罚
///// </summary> /// </summary>
//public Nullable<decimal> Punishment { get; set; } public Nullable<decimal> Punishment { get; set; }
/// <summary> /// <summary>
/// 调节系数 /// 调节系数
......
...@@ -96,10 +96,10 @@ public class PerDataEmployee : IPerData ...@@ -96,10 +96,10 @@ public class PerDataEmployee : IPerData
///// </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>
/// 调节系数 /// 调节系数
......
...@@ -405,6 +405,9 @@ public void Generate(per_allot allot, string mail) ...@@ -405,6 +405,9 @@ public void Generate(per_allot allot, string mail)
logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true);
resultComputeService.SaveReserved(allot); resultComputeService.SaveReserved(allot);
// 科室下发
resultComputeService.GenerateSecondAllot(allot);
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish), generate); UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish), generate);
perforCofdirectorRepository.SupplementaryData(allot.ID); perforCofdirectorRepository.SupplementaryData(allot.ID);
......
...@@ -755,7 +755,10 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId) ...@@ -755,7 +755,10 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
groupbasis += 1; groupbasis += 1;
single = sheet.SheetName.Substring(0, 3); single = sheet.SheetName.Substring(0, 3);
var sheetName = new Regex("[0-9]*").Replace(sheet.SheetName, "", 5).Replace(".", "").Replace(" ", "").Replace("科室绩效", "").Replace("科室", ""); var sheetName = new Regex("[0-9]*").Replace(sheet.SheetName, "", 5).Replace(".", "").Replace(" ", "");
// 只是显示好看而已
if (sheetName != "科室考核")
sheetName = sheetName.Replace("科室绩效", "").Replace("科室", "");
var (sheettype, amount) = ClinicDepartmentDetail(persheet, account, basicData, sheet, type, sheetName); var (sheettype, amount) = ClinicDepartmentDetail(persheet, account, basicData, sheet, type, sheetName);
(sheettype, amount) = CommonDepartmentDetail(basicData, sheet, type, sheettype, amount); (sheettype, amount) = CommonDepartmentDetail(basicData, sheet, type, sheettype, amount);
var items = CommonDetailItems(basicData, headers, sheet, type); var items = CommonDetailItems(basicData, headers, sheet, type);
...@@ -852,7 +855,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId) ...@@ -852,7 +855,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
SheetType[] pairs = new SheetType[] SheetType[] pairs = new SheetType[]
{ {
SheetType.AccountDrugAssess, SheetType.AccountMaterialsAssess, SheetType.AccountScoreAverage, SheetType.AccountAdjustLaterOtherFee, SheetType.AccountDrugAssess, SheetType.AccountMaterialsAssess, SheetType.AccountScoreAverage, SheetType.AccountAdjustLaterOtherFee,
SheetType.AssessBeforeOtherFee SheetType.AssessBeforeOtherFee, SheetType.BudgetRatio
}; };
if (pairs.Contains((SheetType)sheet.SheetType)) if (pairs.Contains((SheetType)sheet.SheetType))
{ {
...@@ -1052,7 +1055,10 @@ public DeptDataDetails DeptOfficeDetail(int accountId) ...@@ -1052,7 +1055,10 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
var (sheettype, amount) = CommonDepartmentDetail(basicData, sheet, UnitType.行政后勤); var (sheettype, amount) = CommonDepartmentDetail(basicData, sheet, UnitType.行政后勤);
var items = CommonDetailItems(basicData, headers, sheet, UnitType.行政后勤); var items = CommonDetailItems(basicData, headers, sheet, UnitType.行政后勤);
var sheetName = new Regex("[0-9]*").Replace(sheet.SheetName, "", 5).Replace(".", "").Replace(" ", "").Replace("科室绩效", "").Replace("科室", ""); var sheetName = new Regex("[0-9]*").Replace(sheet.SheetName, "", 5).Replace(".", "").Replace(" ", "");
// 只是显示好看而已
if (sheetName != "科室考核")
sheetName = sheetName.Replace("科室绩效", "").Replace("科室", "");
var item = new DetailDtos { ItemName = sheetName, IncomeType = sheettype, OriginalType = sheet.SheetType ?? 0, Amount = amount, GroupBasis = groupBasis, Items = items }; var item = new DetailDtos { ItemName = sheetName, IncomeType = sheettype, OriginalType = sheet.SheetType ?? 0, Amount = amount, GroupBasis = groupBasis, Items = items };
deptDetails.Detail.Add(item); deptDetails.Detail.Add(item);
} }
...@@ -1136,7 +1142,10 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second) ...@@ -1136,7 +1142,10 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
var (sheettype, amount) = CommonDepartmentDetail(basicData, sheet, UnitType.特殊核算组); var (sheettype, amount) = CommonDepartmentDetail(basicData, sheet, UnitType.特殊核算组);
var items = CommonDetailItems(basicData, headers, sheet, UnitType.特殊核算组); var items = CommonDetailItems(basicData, headers, sheet, UnitType.特殊核算组);
var sheetName = new Regex("[0-9]*").Replace(sheet.SheetName, "", 5).Replace(".", "").Replace(" ", "").Replace("科室绩效", "").Replace("科室", ""); var sheetName = new Regex("[0-9]*").Replace(sheet.SheetName, "", 5).Replace(".", "").Replace(" ", "");
// 只是显示好看而已
if (sheetName != "科室考核")
sheetName = sheetName.Replace("科室绩效", "").Replace("科室", "");
var item = new DetailDtos { ItemName = sheetName, IncomeType = sheettype, OriginalType = sheet.SheetType ?? 0, Amount = amount, GroupBasis = groupBasis, Items = items }; var item = new DetailDtos { ItemName = sheetName, IncomeType = sheettype, OriginalType = sheet.SheetType ?? 0, Amount = amount, GroupBasis = groupBasis, Items = items };
deptDetails.Detail.Add(item); deptDetails.Detail.Add(item);
} }
......
...@@ -405,7 +405,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS ...@@ -405,7 +405,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
// && w.JobNumber == empolyee.JobNumber && w.EmployeeName == empolyee.DoctorName)?.TotelValue; // && w.JobNumber == empolyee.JobNumber && w.EmployeeName == empolyee.DoctorName)?.TotelValue;
compute.Avg = avg * (empolyee.Basics ?? 0) * compute.Attendance; compute.Avg = avg * (empolyee.Basics ?? 0) * compute.Attendance;
compute.Punishment = 0; compute.Punishment = (empolyee?.Punishment ?? 0);
// 考核前管理绩效 // 考核前管理绩效
compute.ShouldGiveFee = Math.Round((compute.Efficiency + compute.Scale) * compute.Grant + compute.OtherManagePerfor ?? 0); compute.ShouldGiveFee = Math.Round((compute.Efficiency + compute.Scale) * compute.Grant + compute.OtherManagePerfor ?? 0);
// 考核后管理绩效 // 考核后管理绩效
...@@ -481,11 +481,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot ...@@ -481,11 +481,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
FitPeopleValue = item.FitPeopleValue ?? 0, FitPeopleValue = item.FitPeopleValue ?? 0,
Grant = isBudget ? grant : (item.Management ?? 1), Grant = isBudget ? grant : (item.Management ?? 1),
//WorkTime = item.WorkTime, //WorkTime = item.WorkTime,
PostCoefficient = item.PostCoefficient ?? 0, PostCoefficient = item?.PostCoefficient ?? 0,
Attendance = item.Attendance ?? 0, Attendance = item?.Attendance ?? 0,
ScoreAverageRate = item.ScoreAverageRate ?? 1, ScoreAverageRate = item?.ScoreAverageRate ?? 1,
Punishment = 0, Punishment = item?.Punishment ?? 0,
OtherPerfor = item.OtherPerfor ?? 0, OtherPerfor = item?.OtherPerfor ?? 0,
JobTitle = item.JobTitle, JobTitle = item.JobTitle,
JobNumber = item.JobNumber, JobNumber = item.JobNumber,
Adjust = (isBudget ? adjust : item.Adjust) ?? 1m, Adjust = (isBudget ? adjust : item.Adjust) ?? 1m,
......
...@@ -19,6 +19,7 @@ public class ExcelReadConfig ...@@ -19,6 +19,7 @@ public class ExcelReadConfig
new ColumnInfo(nameof(PerDataEmployee.FitPeopleRatio), "绩效基数核算系数", true), new ColumnInfo(nameof(PerDataEmployee.FitPeopleRatio), "绩效基数核算系数", true),
new ColumnInfo(nameof(PerDataEmployee.AccountType), "人员分类"), new ColumnInfo(nameof(PerDataEmployee.AccountType), "人员分类"),
new ColumnInfo(nameof(PerDataEmployee.PostCoefficient), "岗位系数", true), new ColumnInfo(nameof(PerDataEmployee.PostCoefficient), "岗位系数", true),
new ColumnInfo(nameof(PerDataEmployee.Punishment), "医院奖罚", true),
new ColumnInfo(nameof(PerDataEmployee.NightWorkPerfor), "夜班费"), new ColumnInfo(nameof(PerDataEmployee.NightWorkPerfor), "夜班费"),
new ColumnInfo(nameof(PerDataEmployee.AssessBeforeOtherFee), "考核前其他绩效", true), new ColumnInfo(nameof(PerDataEmployee.AssessBeforeOtherFee), "考核前其他绩效", true),
new ColumnInfo(nameof(PerDataEmployee.ScoreAverageRate), "考核得分率", true), new ColumnInfo(nameof(PerDataEmployee.ScoreAverageRate), "考核得分率", true),
...@@ -38,6 +39,7 @@ public class ExcelReadConfig ...@@ -38,6 +39,7 @@ public class ExcelReadConfig
new ColumnInfo(nameof(PerDataClinicEmployee.DoctorName), "医生姓名"), new ColumnInfo(nameof(PerDataClinicEmployee.DoctorName), "医生姓名"),
new ColumnInfo(nameof(PerDataClinicEmployee.JobTitle), "职务分类"), new ColumnInfo(nameof(PerDataClinicEmployee.JobTitle), "职务分类"),
new ColumnInfo(nameof(PerDataClinicEmployee.Basics), "基础绩效系数", true), new ColumnInfo(nameof(PerDataClinicEmployee.Basics), "基础绩效系数", true),
new ColumnInfo(nameof(PerDataClinicEmployee.Punishment), "医院奖罚", true),
new ColumnInfo(nameof(PerDataClinicEmployee.FitPeopleValue), "实际人均绩效", true), new ColumnInfo(nameof(PerDataClinicEmployee.FitPeopleValue), "实际人均绩效", true),
new ColumnInfo(nameof(PerDataClinicEmployee.PermanentStaff), "效率绩效人数", true), new ColumnInfo(nameof(PerDataClinicEmployee.PermanentStaff), "效率绩效人数", true),
new ColumnInfo(nameof(PerDataClinicEmployee.Efficiency), "效率绩效系数", true), new ColumnInfo(nameof(PerDataClinicEmployee.Efficiency), "效率绩效系数", true),
......
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