This commit is contained in:
2023-06-13 17:26:09 +08:00
parent 759b66d789
commit 3a088d4cf9
2 changed files with 146 additions and 73 deletions

View File

@@ -233,12 +233,13 @@ namespace Tnb.PerMgr
MemoryStream ms = new MemoryStream();
workbook.Write(ms);
MemoryStream ms2 = new MemoryStream(ms.ToArray());
ms2.Position = 0;
// FileStreamResult fileStreamResult = new FileStreamResult(ms2, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { FileDownloadName = "导入报错说明.xlsx" };
// return fileStreamResult;
string fileName = $"工艺标准导入报错{DateTime.Now.Ticks}.xlsx";
await _fileManager.UploadFileByType(ms2, FileVariable.TemporaryFilePath, fileName);
using (MemoryStream ms2 = new MemoryStream(ms.ToArray()))
{
ms2.Position = 0;
await _fileManager.UploadFileByType(ms2, FileVariable.TemporaryFilePath, fileName);
}
return new Dictionary<string, string>()
{
["isSuccess"] = "false",