Commit c13d0cc6 by ruyun.zhang@suvalue.com

Merge branch '二次绩效历史人员' into 多分支合并

parents 2a3a72f9 eaad8f37
...@@ -148,18 +148,18 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo ...@@ -148,18 +148,18 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
if (headItems == null || !headItems.Any()) return bodyItems; if (headItems == null || !headItems.Any()) return bodyItems;
var topFixedColumns = headItems.Where(w => w.Type == (int)TempColumnType.TopFixedColumns)?.ToList(); var topFixedColumns = headItems.Where(w => w.Type == (int)TempColumnType.TopFixedColumns)?.ToList();
if (topFixedColumns != null && savedDataList != null && savedDataList.Any(w => w.RowNumber == -1 && w.Type == (int)TempColumnType.TopFixedColumns)) if (topFixedColumns != null)
{ {
var topFixedDataList = new List<BodyItem>(); var topFixedDataList = new List<BodyItem>();
foreach (var column in topFixedColumns) foreach (var column in topFixedColumns)
{ {
var topFixedData = new BodyItem(column); var topFixedData = new BodyItem(column);
var savedData = savedDataList.FirstOrDefault(w => w.RowNumber == -1 && w.Type == (int)TempColumnType.TopFixedColumns && w.ItemName == column.FiledName); var savedData = savedDataList?.FirstOrDefault(w => w.RowNumber == -1 && w.Type == (int)TempColumnType.TopFixedColumns && w.ItemName == column.FiledName);
if (savedData != null) if (savedData != null)
{ {
topFixedData.Value = savedData.ItemValue; topFixedData.Value = savedData.ItemValue;
topFixedData.RowNumber = -1;
} }
topFixedData.RowNumber = -1;
topFixedDataList.Add(topFixedData); topFixedDataList.Add(topFixedData);
} }
SupplementFixedData(secondAllot, topFixedDataList); SupplementFixedData(secondAllot, topFixedDataList);
...@@ -173,7 +173,7 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo ...@@ -173,7 +173,7 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
{ {
// 保存过数据,从保存的数据中心带出信息 // 保存过数据,从保存的数据中心带出信息
// 未保存过数据,带入初始数据(首次填写二次绩效,人员信息来自人员字典,有历史二次绩效记录时,人员信息来自上次二次绩效填写记录) // 未保存过数据,带入初始数据(首次填写二次绩效,人员信息来自人员字典,有历史二次绩效记录时,人员信息来自上次二次绩效填写记录)
if (savedDataList == null) if (savedDataList == null || !savedDataList.Any())
{ {
employeeSource = prevSecondAllot == null ? (int)EmployeeSource.EmployeeDict : (int)EmployeeSource.PrevSecondAllot; employeeSource = prevSecondAllot == null ? (int)EmployeeSource.EmployeeDict : (int)EmployeeSource.PrevSecondAllot;
} }
......
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