Browse Source

更新版本

master
zhaoxinyu 11 months ago
parent
commit
9f2e50b122
  1. 21
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
  2. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAsyncBalanceService.cs

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

@ -221,11 +221,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public async Task<string> BalanceSumByVersionExport(RequestDto input)
{
var entities = await _balanceSumRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount, true).ConfigureAwait(false);
IExporter _excel = new ExcelExporter();
byte[] result = null;
result = await _excel.ExportAsByteArray(entities).ConfigureAwait(false);
result.ShouldNotBeNull();
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);
await _fileContainer.SaveAsync(fileName, result, true).ConfigureAwait(false);
return fileName;
}
@ -715,16 +724,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var next = before + 1;
DateTime lastYear = DateTime.ParseExact(string.Format("{0}-12-{1} 08:00:00", last, p_day), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);//上期时间
DateTime beforeYear = DateTime.ParseExact(string.Format("{0}-12-{1} 07:59:59", before, p_day), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);//这期时间
string version = null;
if (p_billtime >= DateTime.ParseExact(string.Format("{0}-01-01 00:00:00", before), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture)
&& p_billtime <= DateTime.ParseExact(string.Format("{0}-01-01 07:59:59", before), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture))
{
version = $"{last.ToString()}12";
}
if (p_billtime >= DateTime.ParseExact(string.Format("{0}-01-01 08:00:00", before), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture) && p_billtime <= lastYear.AddMonths(1))
{
version = $"{before.ToString()}01";

9
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAsyncBalanceService.cs

@ -59,15 +59,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
[NonAction]
[DisableValidation]
public async Task Invoke(IServiceProvider serviceProvider)

Loading…
Cancel
Save