Browse Source

修改EXCEL导出方式

master
zhouhongjun 11 months ago
parent
commit
12b611c609
  1. 20
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs

20
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs

@ -94,15 +94,17 @@ namespace Win.Sfs.SettleAccount.Bases
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null;
switch (input.FileType)
{
case 0:
result = await _csv.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
break;
case 1:
result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
break;
}
//switch (input.FileType)
//{
// case 0:
// result = await _csv.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
// break;
// case 1:
// result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
// break;
//}
result = await _excel.ExportAsByteArray(dtoDetails).ConfigureAwait(false);
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制

Loading…
Cancel
Save