Commit 84ad6c88 by 1391696987

合并wuzhou

parents bca53ce4 61bf169d
...@@ -436,7 +436,6 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D ...@@ -436,7 +436,6 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
head.AddOrUpdate(nameof(second.UnitType), second.UnitType); head.AddOrUpdate(nameof(second.UnitType), second.UnitType);
head.AddOrUpdate(nameof(ComputeMode), computeMode); head.AddOrUpdate(nameof(ComputeMode), computeMode);
head.AddOrUpdate("ComputeModeDescription", EnumHelper.GetDescription(computeMode)); head.AddOrUpdate("ComputeModeDescription", EnumHelper.GetDescription(computeMode));
var allotStates = new int[] { (int)AllotStates.绩效下发, (int)AllotStates.归档 }; var allotStates = new int[] { (int)AllotStates.绩效下发, (int)AllotStates.归档 };
head.AddOrUpdate(nameof(ag_headsource.SecondId), second.Id); head.AddOrUpdate(nameof(ag_headsource.SecondId), second.Id);
head.AddOrUpdate(nameof(ag_headsource.PaymentOfTheMonth), $"{allot.Year}{allot.Month.ToString().PadLeft(2, '0')}月"); head.AddOrUpdate(nameof(ag_headsource.PaymentOfTheMonth), $"{allot.Year}{allot.Month.ToString().PadLeft(2, '0')}月");
...@@ -474,9 +473,14 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D ...@@ -474,9 +473,14 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
// 已提交 // 已提交
if (second.Status.HasValue && status.Contains(second.Status.Value)) if (second.Status.HasValue && status.Contains(second.Status.Value))
{ {
foreach (var item in headDynamic.Where(w => w.FieldId.StartsWithIgnoreCase("Workload_Ratio_")).OrderBy(t => t.Id)) var groupDatas = headDynamic
.Where(w => w.FieldId.StartsWithIgnoreCase("Workload_Ratio_"))
.GroupBy(w => new { w.WorkTypeId, w.SecondId, w.FieldId, w.FieldName })
.Select(w => new { w.Key.FieldId, Value = w.OrderByDescending(w => w.Id).FirstOrDefault()?.Value ?? 0 });
foreach (var item in groupDatas)
{ {
head.AddOrUpdate(item.FieldId, item.Value ?? 0); head.AddOrUpdate(item.FieldId, item.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