Commit 42e22b8c by 钟博

行政中层管理绩效显示详情补全

parent e4d69ded
...@@ -1626,7 +1626,12 @@ public DeptDataDetails GetDoctorDetail(int computeId) ...@@ -1626,7 +1626,12 @@ public DeptDataDetails GetDoctorDetail(int computeId)
if (isShowManage == 2) if (isShowManage == 2)
doctorDetails.Pandect.RealGiveFee = doctorDetails.Pandect.AssessLaterManagementFee; doctorDetails.Pandect.RealGiveFee = doctorDetails.Pandect.AssessLaterManagementFee;
var sheets = _perforPerSheetRepository.GetEntities(t => t.AllotID == resCompute.AllotID && new int[] { (int)SheetType.PersonExtra, (int)SheetType.PersonAdjustLaterOtherFee }.Contains(t.SheetType.Value)); var types = new int[]
{
(int)SheetType.PersonExtra, (int)SheetType.PersonAdjustLaterOtherFee, (int)SheetType.PersonAdjustLaterOtherManagePerforFee,
(int)SheetType.PersonPostCoefficient, (int)SheetType.PersonOtherManagePerforFee,
};
var sheets = _perforPerSheetRepository.GetEntities(t => t.AllotID == resCompute.AllotID && types.Contains(t.SheetType.Value));
if (sheets == null || !sheets.Any()) return doctorDetails; if (sheets == null || !sheets.Any()) return doctorDetails;
var data = _perforImDataRepository.GetEntities(t => t.AllotID == resCompute.AllotID && sheets.Select(s => s.ID).Contains(t.SheetID.Value)); var data = _perforImDataRepository.GetEntities(t => t.AllotID == resCompute.AllotID && sheets.Select(s => s.ID).Contains(t.SheetID.Value));
...@@ -1641,6 +1646,7 @@ public DeptDataDetails GetDoctorDetail(int computeId) ...@@ -1641,6 +1646,7 @@ public DeptDataDetails GetDoctorDetail(int computeId)
var itemName = Regex.Replace(sheet.SheetName, @"\d", ""); var itemName = Regex.Replace(sheet.SheetName, @"\d", "");
var detail = new DetailDtos var detail = new DetailDtos
{ {
ItemName = itemName.Replace(".", "").Replace(" ", ""), ItemName = itemName.Replace(".", "").Replace(" ", ""),
IncomeType = sheet.SheetType == (int)SheetType.PersonExtra ? 5 : 8, IncomeType = sheet.SheetType == (int)SheetType.PersonExtra ? 5 : 8,
OriginalType = sheet.SheetType ?? 0, OriginalType = sheet.SheetType ?? 0,
...@@ -1668,32 +1674,72 @@ public DeptDataDetails GetAdministration(int computeId) ...@@ -1668,32 +1674,72 @@ public DeptDataDetails GetAdministration(int computeId)
ShowFormula = 0, ShowFormula = 0,
Pandect = new PerDataAccountBaisc Pandect = new PerDataAccountBaisc
{ {
EmployeeName = employee.DoctorName, EmployeeName = employee.DoctorName,//医生姓名
JobNumber = employee.PersonnelNumber, JobNumber = employee.PersonnelNumber,//工号
AccountingUnit = employee.AccountingUnit, AccountingUnit = employee.AccountingUnit,//核算单元
AccountType = employee.AccountType, AccountType = employee.AccountType,//核算单元类型
JobTitle = employee.JobTitle, JobTitle = employee.JobTitle,//职称
FitPeople = employee.FitPeople, FitPeople = employee.FitPeople,//绩效基数核算参考对象
FitPeopleValue = employee.FitPeopleValue ?? 0, FitPeopleValue = employee.FitPeopleValue ?? 0,//绩效基础核算参考值
FitPeopleRatio = employee.FitPeopleRatio, FitPeopleRatio = employee.FitPeopleRatio,//绩效基础核算系数
PostCoefficient = employee.PostCoefficient, PostCoefficient = employee.PostCoefficient,//岗位系数
Attendance = employee.Attendance, Attendance = employee.Attendance,//出勤率
ScoringAverage = employee?.ScoreAverageRate, ScoringAverage = employee?.ScoreAverageRate,//考核得分率
Extra = employee.Punishment, AssessBeforeOtherFee = employee.AssessBeforeOtherFee ?? 0,
NightShiftWorkPerforFee = employee.NightWorkPerfor, Extra = employee.Punishment,//医院奖罚
AdjustFactor = employee.Adjust, NightShiftWorkPerforFee = employee.NightWorkPerfor,//夜班费
AdjustLaterOtherFee = employee?.AdjustLaterOtherFee ?? 0, AdjustFactor = employee.Adjust,//调节系数
AdjustLaterOtherFee = employee?.AdjustLaterOtherFee ?? 0,//调解后其他绩效
PerforTotal = Math.Round(employee.FitPeopleValue ?? 0 * employee.PostCoefficient ?? 0 * employee.Attendance + employee.AssessBeforeOtherFee ?? 0), PerforTotal = Math.Round(employee.FitPeopleValue ?? 0 * employee.PostCoefficient ?? 0 * employee.Attendance + employee.AssessBeforeOtherFee ?? 0),
//考核前绩效
}, },
Detail = new List<DetailDtos>() Detail = new List<DetailDtos>()
}; };
var pandect = doctorDetails.Pandect; var pandect = doctorDetails.Pandect;
//考核后绩效
doctorDetails.Pandect.AssessLaterPerforTotal = Math.Round(pandect.PerforTotal * pandect.ScoringAverage + pandect.Extra ?? 0); doctorDetails.Pandect.AssessLaterPerforTotal = Math.Round(pandect.PerforTotal * pandect.ScoringAverage + pandect.Extra ?? 0);
//实发绩效
doctorDetails.Pandect.RealGiveFee = Math.Round((pandect.AssessLaterPerforTotal * pandect.AdjustFactor + pandect.AdjustLaterOtherFee) ?? 0); doctorDetails.Pandect.RealGiveFee = Math.Round((pandect.AssessLaterPerforTotal * pandect.AdjustFactor + pandect.AdjustLaterOtherFee) ?? 0);
var isShowManage = IsShowManage(resCompute.AllotID.Value);
// 开启 显示管理绩效
if (isShowManage == 2)
doctorDetails.Pandect.RealGiveFee = doctorDetails.Pandect.AssessLaterManagementFee;
var types = new int[]
{
(int)SheetType.PersonExtra, (int)SheetType.PersonAdjustLaterOtherFee, (int)SheetType.PersonAdjustLaterOtherManagePerforFee,
(int)SheetType.PersonPostCoefficient, (int)SheetType.PersonOtherManagePerforFee,
};
var sheets = _perforPerSheetRepository.GetEntities(t => t.AllotID == resCompute.AllotID && types.Contains(t.SheetType.Value));
if (sheets == null || !sheets.Any()) return doctorDetails;
var data = _perforImDataRepository.GetEntities(t => t.AllotID == resCompute.AllotID && sheets.Select(s => s.ID).Contains(t.SheetID.Value));
if (data == null || !data.Any(t => t.JobNumber == (resCompute.JobNumber ?? "") && t.EmployeeName == resCompute.EmployeeName)) return doctorDetails;
data = data.Where(t => t.JobNumber == (resCompute.JobNumber ?? "") && t.EmployeeName == resCompute.EmployeeName).ToList();
foreach (var sheet in sheets)
{
var sheetData = data.Where(t => t.SheetID == sheet.ID);
if (sheetData == null || !sheetData.Any()) continue;
var itemName = Regex.Replace(sheet.SheetName, @"\d", "");
var detail = new DetailDtos
{
ItemName = itemName.Replace(".", "").Replace(" ", ""),
IncomeType = sheet.SheetType == (int)SheetType.PersonExtra ? 5 : 8,
OriginalType = sheet.SheetType ?? 0,
Amount = sheetData.Where(t => t.IsTotal == 1)?.Sum(t => t.CellValue) ?? 0,
Items = sheetData.Where(t => t.IsTotal != 1)?.Select(t => new DetailModule
{
ItemName = t.TypeName,
ItemValue = t.CellValue
}).ToList()
};
doctorDetails.Detail.Add(detail);
}
return doctorDetails; return doctorDetails;
} }
......
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