|
@ -1,6 +1,9 @@ |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
|
|
|
using System.IO; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
|
|
|
using Magicodes.ExporterAndImporter.Core; |
|
|
|
|
|
using Magicodes.ExporterAndImporter.Excel; |
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
using SettleAccount.Domain.BQ; |
|
|
using SettleAccount.Domain.BQ; |
|
@ -51,10 +54,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false); |
|
|
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true).ConfigureAwait(false); |
|
|
var dtos = ObjectMapper.Map<List<BBAC_SE_DETAIL>, List<BBAC_SE_DETAIL_EXPORT_DTO>>(entities); |
|
|
var dtos = ObjectMapper.Map<List<BBAC_SE_DETAIL>, List<BBAC_SE_DETAIL_EXPORT_DTO>>(entities); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExportImporter _exportImporter = new ExportImporter(); |
|
|
ExportImporter _exportImporter = new ExportImporter(); |
|
|
var result = await _exportImporter.ExcelExporter(dtos).ConfigureAwait(false); |
|
|
var result = await _exportImporter.ExcelExporter(dtos).ConfigureAwait(false); |
|
|
result.ShouldNotBeNull(); |
|
|
result.ShouldNotBeNull(); |
|
|
|
|
|
|
|
|
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result }).ConfigureAwait(false); |
|
|
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result }).ConfigureAwait(false); |
|
|
return fileName; |
|
|
return fileName; |
|
|
} |
|
|
} |
|
@ -74,5 +77,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|