diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js index 25c6f341..3a2113a0 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js @@ -1,14 +1,12 @@ import AppList from "../../../components/list/index.js"; import AppForm from "../../../components/form/index.js"; import html from "html"; -import { reactive, ref, nextTick } from "vue"; +import { ref, nextTick } from "vue"; import useConfig from "../../../models/invoice/invoice_map_group.js"; import request from "../../../request/index.js"; import AppTable from "../../components/table/index.js"; -import { ElMessageBox } from "element-plus"; import { post } from "../../../request/index.js"; import { schemaToModel } from "html"; -import { delay } from "../../../utils/index.js"; export default { components: { AppList, AppForm, AppTable }, 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 3b7c8ad9..71fc0975 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 @@ -415,12 +415,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran [HttpPost] public async Task BalanceExport(RequestDto input) { - IQueryable query = _balanceRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda()); - if (!string.IsNullOrEmpty(input.Sorting)) - { - query = DynamicQueryableExtensions.OrderBy(query, input.Sorting); - } - var entities = await query.ToListAsync().ConfigureAwait(false); + var entities = await _balanceRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false); var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx"; var content = this.GetContent(entities, "库存备份"); await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false); @@ -447,12 +442,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran [HttpPost] public async Task LogExport(RequestDto input) { - IQueryable query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda()); - if (!string.IsNullOrEmpty(input.Sorting)) - { - query = DynamicQueryableExtensions.OrderBy(query, input.Sorting); - } - var entities = await query.ToListAsync().ConfigureAwait(false); + var entities = await _logRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false); var fileName = $"库存事务_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx"; var content = this.GetContent(entities, "库存事务_"); await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false); @@ -465,13 +455,9 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran [HttpPost] public async Task ReplenishedExportAsync(RequestDto input) { - IQueryable query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda()); - query = query.Where(o => o.IsReplenished.HasValue && o.IsReplenished.Value == true); - if (!string.IsNullOrEmpty(input.Sorting)) - { - query = DynamicQueryableExtensions.OrderBy(query, input.Sorting); - } - var entities = await query.ToListAsync().ConfigureAwait(false); + //input.Filters.Add(new FilterCondition { Logic = EnumFilterLogic.And, Action = EnumFilterAction.NotEqual, Column = "IsReplenished", Value = "null" }); + var entities = await _logRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false); + //IQueryable query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda()); var fileName = $"补货数据_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx"; var content = this.GetContent(entities, "补货数据_"); await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);