Commit a8584dff by Licx

二次分配未保存数据时带出上次的分配系数

parent 7289fd1c
......@@ -462,6 +462,8 @@ 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)
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);
......@@ -471,6 +473,8 @@ 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)
headDynamic = _agworktypesourceRepository.GetEntities(t => t.SecondId == prevSecondAllot.Id) ?? new List<ag_worktype_source>();
// 已提交
if (second.Status.HasValue && status.Contains(second.Status.Value))
......
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