从二次绩效配置中带出职称绩效 工作量绩效

parent cacffe87
......@@ -29,6 +29,7 @@ public class RedistributionService : IAutoInjection
private readonly PerforPeremployeeRepository _peremployeeRepository;
private readonly PerforRescomputeRepository _rescomputeRepository;
private readonly PerforResaccountRepository _resaccountRepository;
private readonly PerforCofagainRepository _cofagainRepository;
private readonly PerforAgsecondallotRepository _secondallotRepository;
private readonly PerforPerapramountRepository _perapramountRepository;
private readonly PerforAgothersourceRepository _agothersourceRepository;
......@@ -51,6 +52,7 @@ public class RedistributionService : IAutoInjection
PerforPeremployeeRepository peremployeeRepository,
PerforRescomputeRepository rescomputeRepository,
PerforResaccountRepository resaccountRepository,
PerforCofagainRepository cofagainRepository,
PerforAgsecondallotRepository secondallotRepository,
PerforPerapramountRepository perapramountRepository,
PerforAgothersourceRepository agothersourceRepository,
......@@ -71,6 +73,7 @@ public class RedistributionService : IAutoInjection
_peremployeeRepository = peremployeeRepository;
_rescomputeRepository = rescomputeRepository;
_resaccountRepository = resaccountRepository;
_cofagainRepository = cofagainRepository;
_secondallotRepository = secondallotRepository;
_perapramountRepository = perapramountRepository;
_agothersourceRepository = agothersourceRepository;
......@@ -475,8 +478,13 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
if (history == null && prevSecondAllot != null && secondId != prevSecondAllot.Id)
history = _agheadsourceRepository.GetEntity(t => t.SecondId == prevSecondAllot.Id);
head.AddOrUpdate(nameof(ag_headsource.SeniorityTitlesAccountedPerformance), history?.SeniorityTitlesAccountedPerformance ?? 0.2m);
head.AddOrUpdate(nameof(ag_headsource.Workload_Ratio_Default), history?.Workload_Ratio_Default ?? 0.8m);
// 从二次绩效配置中带出
var cfgs = _cofagainRepository.GetEntities(w => w.AllotID == allot.ID) ?? new List<cof_again>();
var titleRatio = cfgs.Where(w => w.Type == 1 || w.TypeName == "职称绩效")?.OrderByDescending(w => w.ID)?.FirstOrDefault()?.Value ?? 0.2m;
var workloadRatio = cfgs.Where(w => w.Type == 2 || w.TypeName == "工作量绩效")?.OrderByDescending(w => w.ID)?.FirstOrDefault()?.Value ?? 0.8m;
head.AddOrUpdate(nameof(ag_headsource.SeniorityTitlesAccountedPerformance), history?.SeniorityTitlesAccountedPerformance ?? titleRatio);
head.AddOrUpdate(nameof(ag_headsource.Workload_Ratio_Default), history?.Workload_Ratio_Default ?? workloadRatio);
head.AddOrUpdate(nameof(ag_headsource.DaysFullAttendance), DateTime.DaysInMonth(allot.Year, allot.Month));
// 多工作量加载
......
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