Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
42437a65c6
  1. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs
  2. 25
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

4
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs

@ -20,7 +20,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 期间
/// </summary>
[Display(Name = "期间")]
public string Version { get; set; }
public int Version { get; set; }
/// <summary>
/// 零件号
@ -85,7 +85,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "期间")]
[ExporterHeader(DisplayName = "期间")]
public string Version { get; set; }
public int Version { get; set; }
/// <summary>
/// 零件号

25
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -7,7 +7,9 @@ using System.Threading;
using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Newtonsoft.Json;
using Nito.AsyncEx;
using NPOI.OpenXmlFormats;
using NPOI.SS.Formula.Functions;
using SettleAccount.Bases;
using SettleAccount.Domain.BQ;
@ -15,6 +17,7 @@ using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.Application.Services;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Uow;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
@ -121,6 +124,10 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
ErpToLoc = string.IsNullOrEmpty(itm.Extend2)?"CC001":itm.Extend2, //寄售库
};
var ls = query.ToList();
var _first= p_ls.FirstOrDefault();
using (var transaction =_dbcontext.Database.BeginTransaction())
{
@ -132,13 +139,23 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
var count = CalculatePageCount(ls.Count, 2000);
for (int pagenumber = 0; pagenumber < count; pagenumber++)
{
ls = GetPagedData(ls, pagenumber, 2000);
foreach (var item in ls)
var lst = GetPagedData(ls, pagenumber, 2000);
var messagelist= new List<VmiMessage>();
foreach (var item in lst)
{
item.SetId(GuidGenerator.Create());
var message = new VmiMessage(Guid.NewGuid())
{
Message = System.Text.Json.JsonSerializer.Serialize(item),
};
messagelist.Add(message);
}
_dbcontext.BulkInsert(ls);
_dbcontext.BulkInsert(messagelist);
_dbcontext.BulkInsert(lst,new BulkConfig() { });
Task.Delay(500);
}
}

Loading…
Cancel
Save