|
@ -223,9 +223,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
var entities = await _balanceSumRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, input.SkipCount, true).ConfigureAwait(false); |
|
|
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 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; |
|
|
return fileName; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -715,16 +724,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
var next = before + 1; |
|
|
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 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);//这期时间
|
|
|
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; |
|
|
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) |
|
|
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)) |
|
|
&& 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"; |
|
|
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)) |
|
|
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"; |
|
|
version = $"{before.ToString()}01"; |
|
|