Commit 0090cfe6 by ruyun.zhang@suvalue.com

Merge branch 'fixed/bug' into v2020calculate

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