Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
587ad40814
  1. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
  2. 50
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  3. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs

@ -55,8 +55,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
item.State = SettleBillState.; item.State = SettleBillState.;
} }
await _repository.DbContext.BulkInsertAsync(ls); await _repository.DbContext.BulkUpdateAsync(ls);
var _taskid = await _service.ExportEnqueueAsync("BBAC待扣减任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyyMM"), string.Empty, CurrentUser, typeof(PendingDeductionService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("PUB待扣减任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyyMM"), string.Empty, CurrentUser, typeof(PendingDeductionService), customConditionList, (rs) =>
{ {
}); });

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

@ -208,26 +208,46 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
// 执行批量数据操作 // 执行批量数据操作
if (ls != null && ls.Count > 0) if (ls != null && ls.Count > 0)
{ {
var count = CalculatePageCount(ls.Count, 2000);
for (int pagenumber = 0; pagenumber < count; pagenumber++)
var messagelist = new List<VmiMessage>();
_dbcontext.BulkInsert(ls);
foreach (var item in ls)
{ {
var lst = GetPagedData(ls, pagenumber++, 2000); var message = new VmiMessage
var messagelist= new List<VmiMessage>();
foreach (var item in lst)
{ {
var message = new VmiMessage Message = System.Text.Json.JsonSerializer.Serialize(item),
{ };
Message = System.Text.Json.JsonSerializer.Serialize(item), messagelist.Add(message);
};
messagelist.Add(message);
}
_dbcontext.BulkInsert(messagelist);
_dbcontext.BulkInsert(lst,new BulkConfig() { });
Task.Delay(500);
} }
_dbcontext.BulkInsert(messagelist);
_dbcontext.BulkInsert(ls,new BulkConfig() { });
//var count = CalculatePageCount(ls.Count, 2000);
//for (int pagenumber = 0; pagenumber < count; pagenumber++)
//{
// var lst = GetPagedData(ls, pagenumber++, 2000);
// var messagelist= new List<VmiMessage>();
// foreach (var item in lst)
// {
// var message = new VmiMessage
// {
// Message = System.Text.Json.JsonSerializer.Serialize(item),
// };
// messagelist.Add(message);
// }
// _dbcontext.BulkInsert(messagelist);
// _dbcontext.BulkInsert(lst,new BulkConfig() { });
// Task.Delay(500);
//}
} }
// 提交事务 // 提交事务
transaction.Commit(); transaction.Commit();
} }
catch (Exception) catch (Exception)
{ {

8
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -708,7 +708,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
guid: itm.Id, guid: itm.Id,
keyCode: itm.KeyCode, keyCode: itm.KeyCode,
version: itm.Version, version: itm.Version,
billNum: itm.BillNum, billNum: itm.InvbillNum,
lU: itm.LU, lU: itm.LU,
rELU: string.Empty, rELU: string.Empty,
pN: itm.PN, pN: itm.PN,
@ -782,7 +782,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
guid: GuidGenerator.Create(), guid: GuidGenerator.Create(),
keyCode: itm.KeyCode, keyCode: itm.KeyCode,
version: itm.Version, version: itm.Version,
billNum: itm.InvGroupNum, billNum: itm.InvBillNum,
settleBillNum: itm.SettleBillNum, settleBillNum: itm.SettleBillNum,
lU: itm.LU, lU: itm.LU,
pN: itm.PN, pN: itm.PN,
@ -817,7 +817,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
guid: GuidGenerator.Create(), guid: GuidGenerator.Create(),
keyCode: itm.KeyCode, keyCode: itm.KeyCode,
version: itm.Version, version: itm.Version,
billNum: itm.InvGroupNum, billNum: itm.InvBillNum,
settleBillNum: itm.SettleBillNum, settleBillNum: itm.SettleBillNum,
lU: itm.LU, lU: itm.LU,
pN: itm.PN, pN: itm.PN,
@ -861,7 +861,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
guid: itm.Id, guid: itm.Id,
keyCode: itm.KeyCode, keyCode: itm.KeyCode,
version: itm.Version, version: itm.Version,
billNum: itm.BillNum, billNum: itm.InvbillNum,
lU: itm.LU, lU: itm.LU,
rELU: string.Empty, rELU: string.Empty,
pN: itm.PN, pN: itm.PN,

Loading…
Cancel
Save