Commit eaad8f37 by lcx

二次绩效详情未带出顶部固定列

parent 80cfbc09
......@@ -148,18 +148,18 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
if (headItems == null || !headItems.Any()) return bodyItems;
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>();
foreach (var column in topFixedColumns)
{
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)
{
topFixedData.Value = savedData.ItemValue;
topFixedData.RowNumber = -1;
}
topFixedData.RowNumber = -1;
topFixedDataList.Add(topFixedData);
}
SupplementFixedData(secondAllot, topFixedDataList);
......@@ -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;
}
......
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