Commit 42e22b8c by 钟博

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

parent e4d69ded
......@@ -1626,7 +1626,12 @@ public DeptDataDetails GetDoctorDetail(int computeId)
if (isShowManage == 2)
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;
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)
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,
......@@ -1668,32 +1674,72 @@ public DeptDataDetails GetAdministration(int computeId)
ShowFormula = 0,
Pandect = new PerDataAccountBaisc
{
EmployeeName = employee.DoctorName,
JobNumber = employee.PersonnelNumber,
AccountingUnit = employee.AccountingUnit,
AccountType = employee.AccountType,
JobTitle = employee.JobTitle,
FitPeople = employee.FitPeople,
FitPeopleValue = employee.FitPeopleValue ?? 0,
FitPeopleRatio = employee.FitPeopleRatio,
PostCoefficient = employee.PostCoefficient,
Attendance = employee.Attendance,
ScoringAverage = employee?.ScoreAverageRate,
Extra = employee.Punishment,
NightShiftWorkPerforFee = employee.NightWorkPerfor,
AdjustFactor = employee.Adjust,
AdjustLaterOtherFee = employee?.AdjustLaterOtherFee ?? 0,
EmployeeName = employee.DoctorName,//医生姓名
JobNumber = employee.PersonnelNumber,//工号
AccountingUnit = employee.AccountingUnit,//核算单元
AccountType = employee.AccountType,//核算单元类型
JobTitle = employee.JobTitle,//职称
FitPeople = employee.FitPeople,//绩效基数核算参考对象
FitPeopleValue = employee.FitPeopleValue ?? 0,//绩效基础核算参考值
FitPeopleRatio = employee.FitPeopleRatio,//绩效基础核算系数
PostCoefficient = employee.PostCoefficient,//岗位系数
Attendance = employee.Attendance,//出勤率
ScoringAverage = employee?.ScoreAverageRate,//考核得分率
AssessBeforeOtherFee = employee.AssessBeforeOtherFee ?? 0,
Extra = employee.Punishment,//医院奖罚
NightShiftWorkPerforFee = employee.NightWorkPerfor,//夜班费
AdjustFactor = employee.Adjust,//调节系数
AdjustLaterOtherFee = employee?.AdjustLaterOtherFee ?? 0,//调解后其他绩效
PerforTotal = Math.Round(employee.FitPeopleValue ?? 0 * employee.PostCoefficient ?? 0 * employee.Attendance + employee.AssessBeforeOtherFee ?? 0),
//考核前绩效
},
Detail = new List<DetailDtos>()
};
var pandect = doctorDetails.Pandect;
//考核后绩效
doctorDetails.Pandect.AssessLaterPerforTotal = Math.Round(pandect.PerforTotal * pandect.ScoringAverage + pandect.Extra ?? 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;
}
......
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