Browse Source

update

master
wanggang 1 year ago
parent
commit
95dfd78553
  1. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js
  2. 24
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

4
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 AppList from "../../../components/list/index.js";
import AppForm from "../../../components/form/index.js"; import AppForm from "../../../components/form/index.js";
import html from "html"; 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 useConfig from "../../../models/invoice/invoice_map_group.js";
import request from "../../../request/index.js"; import request from "../../../request/index.js";
import AppTable from "../../components/table/index.js"; import AppTable from "../../components/table/index.js";
import { ElMessageBox } from "element-plus";
import { post } from "../../../request/index.js"; import { post } from "../../../request/index.js";
import { schemaToModel } from "html"; import { schemaToModel } from "html";
import { delay } from "../../../utils/index.js";
export default { export default {
components: { AppList, AppForm, AppTable }, components: { AppList, AppForm, AppTable },

24
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

@ -415,12 +415,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
[HttpPost] [HttpPost]
public async Task<string> BalanceExport(RequestDto input) public async Task<string> BalanceExport(RequestDto input)
{ {
IQueryable<VmiBalance> query = _balanceRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda<VmiBalance>()); var entities = await _balanceRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false);
if (!string.IsNullOrEmpty(input.Sorting))
{
query = DynamicQueryableExtensions.OrderBy(query, input.Sorting);
}
var entities = await query.ToListAsync().ConfigureAwait(false);
var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx"; var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
var content = this.GetContent(entities, "库存备份"); var content = this.GetContent(entities, "库存备份");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false); await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
@ -447,12 +442,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
[HttpPost] [HttpPost]
public async Task<string> LogExport(RequestDto input) public async Task<string> LogExport(RequestDto input)
{ {
IQueryable<VmiLog> query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda<VmiLog>()); var entities = await _logRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false);
if (!string.IsNullOrEmpty(input.Sorting))
{
query = DynamicQueryableExtensions.OrderBy(query, input.Sorting);
}
var entities = await query.ToListAsync().ConfigureAwait(false);
var fileName = $"库存事务_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx"; var fileName = $"库存事务_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
var content = this.GetContent(entities, "库存事务_"); var content = this.GetContent(entities, "库存事务_");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false); await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
@ -465,13 +455,9 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
[HttpPost] [HttpPost]
public async Task<string> ReplenishedExportAsync(RequestDto input) public async Task<string> ReplenishedExportAsync(RequestDto input)
{ {
IQueryable<VmiLog> query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda<VmiLog>()); //input.Filters.Add(new FilterCondition { Logic = EnumFilterLogic.And, Action = EnumFilterAction.NotEqual, Column = "IsReplenished", Value = "null" });
query = query.Where(o => o.IsReplenished.HasValue && o.IsReplenished.Value == true); var entities = await _logRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false);
if (!string.IsNullOrEmpty(input.Sorting)) //IQueryable<VmiLog> query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda<VmiLog>());
{
query = DynamicQueryableExtensions.OrderBy(query, input.Sorting);
}
var entities = await query.ToListAsync().ConfigureAwait(false);
var fileName = $"补货数据_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx"; var fileName = $"补货数据_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
var content = this.GetContent(entities, "补货数据_"); var content = this.GetContent(entities, "补货数据_");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false); await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);

Loading…
Cancel
Save