diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_CAN_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_CAN_SA_MNG.cs index f2d1ac8f..3fc5e8d4 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_CAN_SA_MNG.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_CAN_SA_MNG.cs @@ -190,7 +190,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers } break; } - await _repository.UpdateAsync(p_entiy).ConfigureAwait(false); + await _repository.DbContext.BulkUpdateAsync(new List { p_entiy }).ConfigureAwait(false); return true; } return false; diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_CAN_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_CAN_SA_MNG.cs index e16c0c5f..7262a234 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_CAN_SA_MNG.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_CAN_SA_MNG.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using EFCore.BulkExtensions; using Microsoft.EntityFrameworkCore; using SettleAccount.Domain.BQ; using Volo.Abp; @@ -48,7 +49,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers /// public virtual async Task SetForwardState(string p_billNum, SettleBillState state) { - var ls = _repository.Where(p => p.InvGroupNum == p_billNum).ToList(); if (ls == null && ls.Count == 0) { @@ -109,7 +109,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers } break; } - await _repository.UpdateAsync(p_entiy).ConfigureAwait(false); + await _repository.DbContext.BulkUpdateAsync(new List { p_entiy }).ConfigureAwait(false); + // await _repository.UpdateAsync(p_entiy).ConfigureAwait(false); return true; } return false;