|
@ -35,6 +35,7 @@ using RestSharp.Extensions; |
|
|
using SettleAccount.Domain.BQ; |
|
|
using SettleAccount.Domain.BQ; |
|
|
using SettleAccount.Job.SignalR; |
|
|
using SettleAccount.Job.SignalR; |
|
|
using Shouldly; |
|
|
using Shouldly; |
|
|
|
|
|
using Shouldly.Configuration; |
|
|
using SqlSugar; |
|
|
using SqlSugar; |
|
|
using TaskJob.EventArgs; |
|
|
using TaskJob.EventArgs; |
|
|
using Volo.Abp; |
|
|
using Volo.Abp; |
|
@ -811,6 +812,48 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
} |
|
|
} |
|
|
var logList = tupleList.Select(o => o.Item1).ToList(); |
|
|
var logList = tupleList.Select(o => o.Item1).ToList(); |
|
|
logList.AsParallel().ForEach(Update); |
|
|
logList.AsParallel().ForEach(Update); |
|
|
|
|
|
List<BBAC_SE_DETAIL> seDetails = new List<BBAC_SE_DETAIL>(); |
|
|
|
|
|
foreach (var item in logList) |
|
|
|
|
|
{ |
|
|
|
|
|
if(item.DeliverBillType== EnumDeliverBjBmpBillType.JIS件&&item.DeliverSubBillType== EnumDeliverSubBillType.保险杠BBAC) |
|
|
|
|
|
{ |
|
|
|
|
|
BBAC_SE_DETAIL seDetail = new BBAC_SE_DETAIL(); |
|
|
|
|
|
seDetail.SetId(item.Id); |
|
|
|
|
|
seDetail.BeginDate = DateTime.Now; |
|
|
|
|
|
seDetail.CreationTime = DateTime.Now; |
|
|
|
|
|
seDetail.IsDeleted = false; |
|
|
|
|
|
seDetail.Version = int.Parse(item.BillTime?.ToString("yyyyMM")); |
|
|
|
|
|
seDetail.ShippingDate = (DateTime)item.BillTime; |
|
|
|
|
|
seDetail.Qty = item.Qty; |
|
|
|
|
|
seDetail.IsHaveEdiData = false; |
|
|
|
|
|
seDetail.BusinessType = EnumBusinessType.JisBBAC; |
|
|
|
|
|
seDetail.AssembleData = (DateTime)item.AssembleData; |
|
|
|
|
|
seDetail.BillType = 0; |
|
|
|
|
|
seDetail.DeliverBillType = (EnumDeliverBjBmpBillType)item.DeliverBillType; |
|
|
|
|
|
seDetail.DeliverSubBillType = (EnumDeliverSubBillType)item.DeliverSubBillType; |
|
|
|
|
|
seDetail.ProType = 0; |
|
|
|
|
|
seDetail.State = 0; |
|
|
|
|
|
seDetail.SubBillType = 0; |
|
|
|
|
|
seDetail.TransType = EnumDelTransType.发货; |
|
|
|
|
|
seDetail.UID = 000; |
|
|
|
|
|
seDetail.FactoryPartCode = item.RealPartCode; |
|
|
|
|
|
seDetail.CustomerPartCodeNoSpace = item.RealPartCode.Replace("-", ""); |
|
|
|
|
|
seDetail.ErpToLoc= item.ErpToLoc; |
|
|
|
|
|
seDetail.Qty=item.Qty; |
|
|
|
|
|
seDetail.VinCode= item.VinCode; |
|
|
|
|
|
seDetail.PN = item.VinCode; |
|
|
|
|
|
seDetail.LU = item.CustPartCode; |
|
|
|
|
|
seDetail.CustPartCode = item.CustPartCode; |
|
|
|
|
|
seDetail.BillTime= item.BillTime; |
|
|
|
|
|
|
|
|
|
|
|
seDetail.Remark = "期初初始化"; |
|
|
|
|
|
|
|
|
|
|
|
seDetails.Add(seDetail); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//var messageList = logList.Select(log => new VmiMessage { Message = JsonSerializer.Serialize(log) }).ToList();
|
|
|
//var messageList = logList.Select(log => new VmiMessage { Message = JsonSerializer.Serialize(log) }).ToList();
|
|
|
var connectionString = this._serviceProvider.GetRequiredService<IConfiguration>().GetConnectionString("SettleAccountService"); |
|
|
var connectionString = this._serviceProvider.GetRequiredService<IConfiguration>().GetConnectionString("SettleAccountService"); |
|
|
var options = new DbContextOptionsBuilder<SettleAccountDbContext>().UseSqlServer(connectionString).Options; |
|
|
var options = new DbContextOptionsBuilder<SettleAccountDbContext>().UseSqlServer(connectionString).Options; |
|
@ -832,6 +875,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
|
|
|
|
|
await context.BulkInsertAsync(logList).ConfigureAwait(false); |
|
|
await context.BulkInsertAsync(logList).ConfigureAwait(false); |
|
|
//await context.BulkInsertAsync(messageList).ConfigureAwait(false);
|
|
|
//await context.BulkInsertAsync(messageList).ConfigureAwait(false);
|
|
|
|
|
|
await context.BulkInsertAsync(seDetails).ConfigureAwait(false); |
|
|
transaction.Commit(); |
|
|
transaction.Commit(); |
|
|
} |
|
|
} |
|
|
catch (Exception ex) |
|
|
catch (Exception ex) |
|
|