Commit 0090cfe6 by ruyun.zhang@suvalue.com

Merge branch 'fixed/bug' into v2020calculate

parents d37d7cda e86c6bf9
...@@ -496,30 +496,36 @@ public void GenerateSecondAllot(per_allot allot) ...@@ -496,30 +496,36 @@ public void GenerateSecondAllot(per_allot allot)
{ {
foreach (var item in accountUnit) foreach (var item in accountUnit)
{ {
tempSecond.Add(new ag_secondallot if (!tempSecond.Any(f => f.UnitType == ((UnitType)item.UnitType).ToString() && f.Department == item.AccountingUnit))
{ {
AllotId = allot.ID, tempSecond.Add(new ag_secondallot
Year = allot.Year, {
Month = allot.Month, AllotId = allot.ID,
UnitType = ((UnitType)item.UnitType).ToString(), Year = allot.Year,
Department = item.AccountingUnit, Month = allot.Month,
RealGiveFee = item.RealGiveFee, UnitType = ((UnitType)item.UnitType).ToString(),
}); Department = item.AccountingUnit,
RealGiveFee = item.RealGiveFee,
});
}
} }
} }
if (specialList != null) if (specialList != null)
{ {
foreach (var item in specialList) foreach (var item in specialList.Select(w => new { w.AccountingUnit, w.RealGiveFee }).Distinct())
{ {
tempSecond.Add(new ag_secondallot if (!tempSecond.Any(f => f.UnitType == UnitType.特殊核算组.ToString() && f.Department == item.AccountingUnit))
{ {
AllotId = allot.ID, tempSecond.Add(new ag_secondallot
Year = allot.Year, {
Month = allot.Month, AllotId = allot.ID,
UnitType = UnitType.特殊核算组.ToString(), Year = allot.Year,
Department = item.AccountingUnit, Month = allot.Month,
RealGiveFee = item.RealGiveFee, UnitType = UnitType.特殊核算组.ToString(),
}); Department = item.AccountingUnit,
RealGiveFee = item.RealGiveFee,
});
}
} }
} }
......
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