下发BUG修复

parent b4344e26
......@@ -496,30 +496,36 @@ public void GenerateSecondAllot(per_allot allot)
{
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,
Year = allot.Year,
Month = allot.Month,
UnitType = ((UnitType)item.UnitType).ToString(),
Department = item.AccountingUnit,
RealGiveFee = item.RealGiveFee,
});
tempSecond.Add(new ag_secondallot
{
AllotId = allot.ID,
Year = allot.Year,
Month = allot.Month,
UnitType = ((UnitType)item.UnitType).ToString(),
Department = item.AccountingUnit,
RealGiveFee = item.RealGiveFee,
});
}
}
}
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,
Year = allot.Year,
Month = allot.Month,
UnitType = UnitType.特殊核算组.ToString(),
Department = item.AccountingUnit,
RealGiveFee = item.RealGiveFee,
});
tempSecond.Add(new ag_secondallot
{
AllotId = allot.ID,
Year = allot.Year,
Month = allot.Month,
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