|
|
@ -18,10 +18,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
|
|
|
public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable |
|
|
|
{ |
|
|
|
private readonly IServiceProvider _serviceProvider; |
|
|
|
private readonly EnumBusinessType _businessType; |
|
|
|
|
|
|
|
public JisBBACSeEdiCompareAppService(IServiceProvider serviceProvider) |
|
|
|
{ |
|
|
|
_serviceProvider = serviceProvider; |
|
|
|
_businessType = EnumBusinessType.JisBBAC; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
@ -35,6 +37,7 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable |
|
|
|
await HandDelEdiDataAsync().ConfigureAwait(false); |
|
|
|
|
|
|
|
var seDetailGroup = db.Set<BBAC_SE_DETAIL>() |
|
|
|
.Where(t => t.BusinessType == _businessType) |
|
|
|
.Where(t => t.IsHaveEdiData == false) |
|
|
|
.GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }) |
|
|
|
.Select(t => t.Key); |
|
|
@ -53,6 +56,7 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable |
|
|
|
var pns = keyCodes.Select(t => t.PN).Distinct().ToList(); |
|
|
|
|
|
|
|
var seDetails = db.Set<BBAC_SE_DETAIL>() |
|
|
|
.Where(t => t.BusinessType == _businessType) |
|
|
|
.Where(t => t.IsHaveEdiData == false) |
|
|
|
.Where(t => pns.Contains(t.PN)) |
|
|
|
.AsEnumerable<BBAC_SE_DETAIL>() |
|
|
|