Commit d32ee3a4 by 纪旭 韦

二次分配录入

parent 3631c239
......@@ -102,6 +102,9 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
var allot = _perallotRepository.GetEntity(t => t.ID == second.AllotId);
if (allot == null) throw new PerformanceException("绩效记录不存在!");
//前二次绩效
prevSecondAllot = _secondAllotDetails.GetPreviousSecondAllot(allot.HospitalId, second);
// 填报模板带出 行政工勤 绩效
var computes = _rescomputeRepository.GetEntities(w => w.AllotID == allot.ID && UnitTypeUtil.Office.Contains(w.AccountType));
......@@ -469,7 +472,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
{
int secondId = overrideMode == EmployeeSource.PrevSecondAllot ? prevSecondAllot.Id : second.Id;
var history = _agheadsourceRepository.GetEntity(t => t.SecondId == secondId);
if (history == null && secondId != (prevSecondAllot?.Id ?? 0))
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);
......@@ -480,7 +483,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
var status = (new int[] { (int)SecondAllotStatus.WaitReview, (int)SecondAllotStatus.PassAudit });
var headDynamic = _agworktypesourceRepository.GetEntities(t => t.SecondId == secondId) ?? new List<ag_worktype_source>();
if (!headDynamic.Any() && secondId != (prevSecondAllot?.Id ?? 0))
if (!headDynamic.Any() && prevSecondAllot != null && secondId != prevSecondAllot.Id)
headDynamic = _agworktypesourceRepository.GetEntities(t => t.SecondId == prevSecondAllot.Id) ?? new List<ag_worktype_source>();
......
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