|
|
@ -1,4 +1,4 @@ |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.ComponentModel.DataAnnotations; |
|
|
|
using System.Reflection; |
|
|
@ -73,15 +73,16 @@ 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: |
|
|
|
//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); |
|
|
|
break; |
|
|
|
} |
|
|
|
result.ShouldNotBeNull(); |
|
|
|
|
|
|
|
//保存导出文件到服务器存成二进制
|
|
|
|