Browse Source

[177] 买单件比对逻辑变更

master
mahao 1 year ago
parent
commit
d7c8e33d7c
  1. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs

8
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs

@ -354,7 +354,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// </remarks> /// </remarks>
private List<BBAC_SA_DETAIL> GroupSaDetails(List<BBAC_SA_DETAIL> bbacSaDetails) private List<BBAC_SA_DETAIL> GroupSaDetails(List<BBAC_SA_DETAIL> bbacSaDetails)
{ {
return bbacSaDetails.GroupBy(t => new { t.PN, t.LU, t.GroupNum, t.SettleDate }).Select(t => return bbacSaDetails.GroupBy(t => new { t.PN, t.LU, t.GroupNum, t.SettleDate, t.BusinessType }).Select(t =>
{ {
var bbacSaDetail = t.First(); var bbacSaDetail = t.First();
bbacSaDetail.Qty = t.Sum(t => t.Qty); bbacSaDetail.Qty = t.Sum(t => t.Qty);
@ -467,7 +467,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
bbacCanSaDetails.ForEach(bbacCanSaDetail => bbacCanSaDetails.ForEach(bbacCanSaDetail =>
{ {
bbacCanSaDetail.BillNum = bbacCanSaDetail.InvGroupNum = bbacCanSaBillNum; bbacCanSaDetail.BillNum = bbacCanSaDetail.InvGroupNum = bbacCanSaBillNum;
bbacCanSaDetail.BusinessType = _businessType;
}); });
await _bbacCanSaRepository.InsertAsync(bbacCanSa).ConfigureAwait(false); await _bbacCanSaRepository.InsertAsync(bbacCanSa).ConfigureAwait(false);
@ -475,11 +474,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
if (bbacNotSaDetails.Count > 0) if (bbacNotSaDetails.Count > 0)
{ {
bbacNotSaDetails.ForEach(bbacNotSaDetail =>
{
bbacNotSaDetail.BusinessType = _businessType;
});
await _bbacNotSaDetailRepository.DbContext.BulkInsertAsync(bbacNotSaDetails).ConfigureAwait(false); await _bbacNotSaDetailRepository.DbContext.BulkInsertAsync(bbacNotSaDetails).ConfigureAwait(false);
} }
if (materialRelationships.Count > 0) if (materialRelationships.Count > 0)

Loading…
Cancel
Save