diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs index c089328b..9be945d9 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs @@ -99,6 +99,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs var bbac_not_list= query.Select(p => p.b).ToList(); if(bbac_can_list.Count>0) { + + notlist.AddRange(bbac_not_list); + var t1 = bbac_can_list.GroupBy(p => p.LU).Select(p => new { LU = p.Key, Amt = p.Sum(itm => itm.Qty * itm.Price) }).OrderByDescending(p => p.Amt).ToList(); var part_group_big = t1.Where(p => p.Amt >= 10000000).ToList(); var part_group_small = t1.Where(p => p.Amt < 10000000).ToList(); @@ -426,6 +429,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs var hbpo_not_list = query.Select(p => p.b).ToList(); if (hbpo_can_list.Count > 0) { + notlist.AddRange(hbpo_not_list); var t1 = hbpo_can_list.GroupBy(p => p.LU).Select(p => new { LU = p.Key, Amt = p.Sum(itm => itm.Qty * itm.Price) }).OrderByDescending(p => p.Amt).ToList(); var part_group_big = t1.Where(p => p.Amt >= 10000000).ToList(); var part_group_small = t1.Where(p => p.Amt < 10000000).ToList(); @@ -518,7 +522,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs { if (billDetails.Count > 0) { - _dbcontext.BulkDelete(p_list);//删除不可结数据 + _dbcontext.BulkDelete(notlist);//删除不可结数据 _dbcontext.BulkInsert(billDetails);//插入可结明细 _dbcontext.BulkInsert(billList);//插入可结主表