|
|
@ -354,7 +354,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
/// </remarks>
|
|
|
|
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(); |
|
|
|
bbacSaDetail.Qty = t.Sum(t => t.Qty); |
|
|
@ -467,7 +467,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
bbacCanSaDetails.ForEach(bbacCanSaDetail => |
|
|
|
{ |
|
|
|
bbacCanSaDetail.BillNum = bbacCanSaDetail.InvGroupNum = bbacCanSaBillNum; |
|
|
|
bbacCanSaDetail.BusinessType = _businessType; |
|
|
|
}); |
|
|
|
|
|
|
|
await _bbacCanSaRepository.InsertAsync(bbacCanSa).ConfigureAwait(false); |
|
|
@ -475,11 +474,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
} |
|
|
|
if (bbacNotSaDetails.Count > 0) |
|
|
|
{ |
|
|
|
bbacNotSaDetails.ForEach(bbacNotSaDetail => |
|
|
|
{ |
|
|
|
bbacNotSaDetail.BusinessType = _businessType; |
|
|
|
}); |
|
|
|
|
|
|
|
await _bbacNotSaDetailRepository.DbContext.BulkInsertAsync(bbacNotSaDetails).ConfigureAwait(false); |
|
|
|
} |
|
|
|
if (materialRelationships.Count > 0) |
|
|
|