Commit 1cb1c2b6 by wyc

管理绩效详情补充

parent ca2f2163
......@@ -273,6 +273,8 @@ public enum TitleManage
其他管理绩效 = 4700,
调节系数 = 4801,
调节后其他绩效 = 4901,
调节后其他管理绩效 = 4910,
// 业务中层行政中高层调节后其他绩效 = 4920,
绩效合计 = 5001,
}
public enum DisplayRule
......
......@@ -949,6 +949,10 @@ public List<UniteDeptDetailItem> GetEmpDetailSetting(int allotId)
var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId);
if (allot == null) throw new PerformanceException("绩效月信息错误");
var ignore = _configuration.GetSection("UniteDeptDetailIgnore").Get<string[]>() ?? Array.Empty<string>();
var persheet = _perforPerSheetRepository.GetEntities(t => t.AllotID == allotId) ?? new List<per_sheet>();
var basicData = _perforImDataRepository.GetEntities(t => t.AllotID == allotId) ?? new List<im_data>();
var response = new List<UniteDeptDetailItem>() { };
#region 行政工勤
//response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.人员工号.ToString() });
......@@ -971,7 +975,6 @@ public List<UniteDeptDetailItem> GetEmpDetailSetting(int allotId)
response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.管理绩效发放系数.ToString() });
response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.考核前管理绩效.ToString() });
response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.考核后管理绩效.ToString() });
response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.其他管理绩效.ToString() });
#endregion
#region 共有
response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.考核前绩效.ToString() });
......@@ -979,10 +982,47 @@ public List<UniteDeptDetailItem> GetEmpDetailSetting(int allotId)
response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.考核得分率.ToString(), Format = UniteDept.Format.整数百分比.ToString() });
response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.医院奖罚.ToString() });
response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.调节系数.ToString(), Format = UniteDept.Format.整数百分比.ToString() });
response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.调节后其他绩效.ToString() });
response.Add(new UniteDeptDetailItem { Title = ManagementDept.TitleManage.绩效合计.ToString() });
#endregion
#region 补全公共附属表明细
var rightSheetTypeMaps = new List<UniteDeptDetailItem>()
{
new UniteDeptDetailItem { Title = ManagementDept.TitleManage.基础绩效系数.ToString(), SheetType = (int)SheetType.PersonPostCoefficient},
new UniteDeptDetailItem { Title = ManagementDept.TitleManage.医院奖罚.ToString(), SheetType = (int)SheetType.PersonExtra},
new UniteDeptDetailItem { Title = ManagementDept.TitleManage.其他管理绩效.ToString(), SheetType = (int)SheetType.PersonOtherManagePerforFee},
new UniteDeptDetailItem { Title = ManagementDept.TitleManage.调节后其他绩效.ToString(), SheetType = (int)SheetType.PersonAdjustLaterOtherFee},
new UniteDeptDetailItem { Title = ManagementDept.TitleManage.调节后其他管理绩效.ToString(),SheetType=(int)SheetType.PersonAdjustLaterOtherManagePerforFee},
};
foreach (var detail in rightSheetTypeMaps)
{
response.Add(detail);
var items = new List<UniteDeptDetailItem>();
foreach (var sheet in persheet.Where(t => t.SheetType == detail.SheetType))
{
var sheetName = BeautifulName(sheet.SheetName);
var postDatas = basicData.Where(t => t.SheetID == sheet.ID && t.IsTotal != 1);
if (detail.Title == UniteDept.Title.预算比例.ToString() || detail.Title == UniteDept.Title.考核得分率.ToString() || detail.Title == UniteDept.Title.调节系数.ToString())
{
items.AddRange(postDatas.GroupBy(t => new { t.TypeName })
.Where(post => !ignore.Contains(post.Key.TypeName))
.Select(post => new UniteDeptDetailItem { Title = post.Key.TypeName, IsAllowRemark = false, Format = UniteDept.Format.四位小数百分比.ToString() }));
}
else
{
items.AddRange(postDatas.GroupBy(t => new { t.TypeName })
.Where(post => !ignore.Contains(post.Key.TypeName))
.Select(post => new UniteDeptDetailItem { Title = post.Key.TypeName, IsAllowRemark = false }));
}
}
detail.Children = items;
}
#endregion
//初始化配置
InitRecursion(response, null);
......@@ -1020,7 +1060,14 @@ public void SaveEmpDetailSetting(int allotId, List<UniteDeptDetailItem> request)
_perforCofEmpDetailRepository.Update(entity);
}
}
/// <summary>
/// 管理绩效详情
/// </summary>
/// <param name="request"></param>
/// <param name="userid"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
/// <exception cref="PerformanceException"></exception>
public List<UniteDeptDetailResponse> EmpDetail(EmpDetailRequest request, int userid)
{
//当角色对应时过滤
......@@ -1029,7 +1076,6 @@ public List<UniteDeptDetailResponse> EmpDetail(EmpDetailRequest request, int use
if (userInfo.URole == null) throw new NotImplementedException("当前用户暂未分配角色");
if (!userInfo.Hospitals.NotNullOrEmpty()) throw new NotImplementedException("当前用户暂未分配医院");
var responses = new List<UniteDeptDetailResponse>();
var resComputes = new List<res_compute>();
if (request.ComputeId > 0)
......@@ -1077,10 +1123,11 @@ public List<UniteDeptDetailResponse> EmpDetail(EmpDetailRequest request, int use
if (!Enum.TryParse(resCompute.UnitType == null ? resCompute.AccountType : resCompute.UnitType, ignoreCase: true, out UnitType unitType))
throw new PerformanceException("核算组别错误");
var ignore = _configuration.GetSection("UniteDeptDetailIgnore").Get<string[]>() ?? Array.Empty<string>();
var persheet = _perforPerSheetRepository.GetEntities(t => t.AllotID == resCompute.AllotID) ?? new List<per_sheet>();
var headers = _perforImheaderRepository.GetEntities(t => t.AllotID == resCompute.AllotID) ?? new List<im_header>();
var basicData = _perforImDataRepository.GetEntities(t => t.AllotID == resCompute.AllotID && t.AccountingUnit == resCompute.AccountingUnit) ?? new List<im_data>();
var basicData = _perforImDataRepository.GetEntities(t => t.AllotID == resCompute.AllotID && t.AccountingUnit == resCompute.AccountingUnit&&t.JobNumber==resCompute.JobNumber) ?? new List<im_data>();
var employee = _perforImemployeeclinicRepository.GetEntity(t => t.AllotID == resCompute.AllotID && t.AccountingUnit == resCompute.AccountingUnit && t.UnitType == resCompute.UnitType && t.PersonnelNumber == resCompute.JobNumber);
......@@ -1182,8 +1229,10 @@ public List<UniteDeptDetailResponse> EmpDetail(EmpDetailRequest request, int use
new DeptDetailItem { Title = ManagementDept.TitleManage.基础绩效系数.ToString(),SheetType=SheetType.PersonPostCoefficient, Total = employee?.Basics ?? 0 },
new DeptDetailItem { Title = ManagementDept.TitleManage.医院奖罚.ToString(),SheetType=SheetType.PersonExtra, Total = resCompute.Punishment ?? 0 },
new DeptDetailItem { Title = ManagementDept.TitleManage.其他管理绩效.ToString(),SheetType=SheetType.PersonOtherManagePerforFee, Total = resCompute.OtherManagePerfor ?? 0 },
new DeptDetailItem { Title = ManagementDept.TitleManage.调节后其他绩效.ToString(), SheetType = SheetType.AccountAdjustLaterOtherFee, Total = employee?.AdjustLaterOtherFee ?? 0, },
new DeptDetailItem { Title = ManagementDept.TitleManage.调节后其他绩效.ToString(), SheetType = SheetType.PersonAdjustLaterOtherFee, Total = employee?.AdjustLaterOtherFee ?? 0 },
new DeptDetailItem { Title = ManagementDept.TitleManage.调节后其他管理绩效.ToString(),SheetType=SheetType.PersonAdjustLaterOtherManagePerforFee, Total = 0 },
};
foreach (var detail in rightSheetTypeMaps)
{
response.DetailItems.Add(detail);
......
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