Browse Source

增加接口命令执行时间

master
zhouhongjun 6 months ago
parent
commit
b2fdc8306f
  1. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs
  2. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs
  3. 2
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/ExChangeCenterDbContext.cs
  4. 8
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/WMSBJBMPTDbContext.cs

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs

@ -105,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(5000).ToList();
.OrderBy(b => b.UID).Take(5_000).ToList();
var jisSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIT_RECORD>, List<BBAC_SE_DETAIL>>(wmsSeRecords);
if (jisSeDetails.Any())
{
@ -147,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(5000).ToList();
.OrderBy(b => b.UID).Take(5_000).ToList();
var jisSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIS_RECORD>, List<BBAC_SE_DETAIL>>(wmsSeRecords);
if (jisSeDetails.Any())
{

8
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs

@ -93,7 +93,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
//业务类别
var businessType = SeSyncConfigInfo.BusinessType;
var seed = 0;
while (seed < 10)
while (seed < 6)
{
seed++;
var syncPositionFlag = await _settleAccountDbContext.Set<SyncPositionFlag>().FirstOrDefaultAsync(t => t.TableName == syncTableName).ConfigureAwait(false);
@ -104,7 +104,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(5_000).ToList();
var jisSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIT_RECORD>, List<HBPO_SE_DETAIL>>(wmsSeRecords);
if (jisSeDetails.Any())
{
@ -135,7 +135,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
//业务类别
var businessType = SeSyncConfigInfo.BusinessType;
var seed = 0;
while (seed < 10)
while (seed < 6)
{
seed++;
var syncPositionFlag = await _settleAccountDbContext.Set<SyncPositionFlag>().FirstOrDefaultAsync(t => t.TableName == syncTableName).ConfigureAwait(false);
@ -146,7 +146,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(5_000).ToList();
var jisSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIS_RECORD>, List<HBPO_SE_DETAIL>>(wmsRecords);
if (jisSeDetails.Any())
{

2
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/ExChangeCenterDbContext.cs

@ -15,7 +15,7 @@ namespace Win.Sfs.SettleAccount.EntityFrameworkCore
public ExChangeCenterDbContext(DbContextOptions<ExChangeCenterDbContext> options) : base(options)
{
//this.Database.SetCommandTimeout(System.TimeSpan.FromMinutes(50));
this.Database.SetCommandTimeout(System.TimeSpan.FromMinutes(50));
}
protected override void OnModelCreating(ModelBuilder modelBuilder)

8
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/WMSBJBMPTDbContext.cs

@ -11,13 +11,13 @@ namespace Win.Sfs.SettleAccount.EntityFrameworkCore
public DbSet<TM_BJBMPT_JIS_RECORD> TM_BJBMPT_JIS_RECORD { get; set; }
public DbSet<TM_BJBMPT_OTHER_RECORD> TM_BJBMPT_OTHER_RECORD { get; set; }
public WMSBJBMPTDbContext()
{
}
//public WMSBJBMPTDbContext()
//{
//}
public WMSBJBMPTDbContext(DbContextOptions<WMSBJBMPTDbContext> options) : base(options)
{
//this.Database.SetCommandTimeout(System.TimeSpan.FromMinutes(50));
this.Database.SetCommandTimeout(System.TimeSpan.FromMinutes(50));
}
protected override void OnModelCreating(ModelBuilder modelBuilder)

Loading…
Cancel
Save