diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_NOT_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_NOT_SA_SERVICE.cs index 2ae2938f..c43900c9 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_NOT_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_NOT_SA_SERVICE.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using SettleAccount.Domain.BQ; +using Volo.Abp.Uow; using Win.Abp.Snowflakes; using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.SettleAccount.Bases; @@ -14,6 +15,10 @@ using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.Entities.BQ.Managers; using Win.Sfs.SettleAccount.ExportReports; using Win.Sfs.Shared.RepositoryBase; +using Win.Sfs.Shared.Filter; +using System.Linq; +using System.LinqAsync; +using Microsoft.EntityFrameworkCore; namespace Win.Sfs.SettleAccount.Entities.BQ { @@ -37,10 +42,21 @@ namespace Win.Sfs.SettleAccount.Entities.BQ _pubNotMng = pubNotMng; } - + public override async Task GenerateSettlementOrder(PUB_NOT_SA_DETAIL_REQ_DTO input) { - var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false); + + var filters = input.Filters.ToLambda(); + + var query=await _detailRepository.GetQueryableAsync().ConfigureAwait(false); + + if (input.Filters.Count > 0) + { + query =query.Where(input.Filters.ToLambda()); + } + + var entitys = query.AsNoTracking().ToList(); + // var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount).ConfigureAwait(false); List errorlist = new List(); if (entitys == null) { diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs index 1321abe6..58548e90 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs @@ -68,6 +68,8 @@ using Win.Sfs.Shared; using Win.Sfs.Shared.Filter; using Win.Sfs.Shared.RepositoryBase; + + namespace Win.Sfs.SettleAccount.Entities.BQ { [AllowAnonymous] diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs index 86a4f11c..2d67df99 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs @@ -11,6 +11,7 @@ using Volo.Abp; using Volo.Abp.Data; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Services; +using Volo.Abp.Uow; using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Bases.DomainServices; using Win.Sfs.SettleAccount.Entities.Prices; @@ -59,6 +60,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers _notRepository = notRepository; _priceydRepository = priceydRepository; } + public virtual async Task> GenerateSettlementOrder(List p_list) { if (p_list.Count == 0)