|
|
@ -1,9 +1,11 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Coravel.Invocable; |
|
|
|
using EFCore.BulkExtensions; |
|
|
|
using Hangfire.Common; |
|
|
|
using LinqToDB; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using SettleAccount.Domain.BQ; |
|
|
@ -103,7 +105,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
.Where(t => t.UID > int.Parse(syncPosition)) |
|
|
|
.Where(t => t.DeliverBillType == deliverBillType) |
|
|
|
.Where(t => deliverSubBillTypes.Contains(t.DeliverSubBillType)) |
|
|
|
.OrderBy(b => b.UID).Take(10_000).ToList(); |
|
|
|
.OrderBy(b => b.UID).Take(1_000).ToList(); |
|
|
|
var jisSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIT_RECORD>, List<BBAC_SE_DETAIL>>(wmsSeRecords); |
|
|
|
if (jisSeDetails.Any()) |
|
|
|
{ |
|
|
@ -121,7 +123,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
/// </summary>
|
|
|
|
/// <remarks>
|
|
|
|
/// 同步TM_BJBMPT_JIS_RECORD表发运数据
|
|
|
|
/// 同步十次、每次同步100_000条发运数据
|
|
|
|
/// 同步十次、每次同步1_000条发运数据
|
|
|
|
/// </remarks>
|
|
|
|
private async Task SyncJisRecordAsync() |
|
|
|
{ |
|
|
@ -145,7 +147,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
.Where(t => t.UID > int.Parse(syncPosition)) |
|
|
|
.Where(t => t.DeliverBillType == deliverBillType) |
|
|
|
.Where(t => deliverSubBillTypes.Contains(t.DeliverSubBillType)) |
|
|
|
.OrderBy(b => b.UID).Take(10_000).ToList(); |
|
|
|
.OrderBy(b => b.UID).Take(1_000).ToList(); |
|
|
|
var jisSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIS_RECORD>, List<BBAC_SE_DETAIL>>(wmsSeRecords); |
|
|
|
if (jisSeDetails.Any()) |
|
|
|
{ |
|
|
@ -201,6 +203,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
t.CreationTime = dateTimeNow; |
|
|
|
}); |
|
|
|
var syncPosition = seDetails.Last().UID.ToString(); |
|
|
|
|
|
|
|
|
|
|
|
using var transaction = await _settleAccountDbContext.Database.BeginTransactionAsync().ConfigureAwait(false); |
|
|
|
try |
|
|
|