From 1081db363ed149b04f3208182fbd31e0f38f2736 Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Wed, 30 Aug 2023 10:58:08 +0800 Subject: [PATCH] up --- .../ImportExcelCommon/ExportImporter.cs | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs index 04a31bae..97341682 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs @@ -85,24 +85,25 @@ namespace Win.Sfs.SettleAccount.ExcelImporter { //保存成物理文件 await file.CopyToAsync(memoryStream); - await _excelImportService.SaveBlobAsync( - new SaveExcelImportInputDto - { - Name = Path.GetFileName(FileOriginName), - Content = memoryStream.ToArray() - } - ); + //await _excelImportService.SaveBlobAsync( + // new SaveExcelImportInputDto + // { + // Name = Path.GetFileName(FileOriginName), + // Content = memoryStream.ToArray() + // } + // ); + await fc.SaveAsync(FileOriginName, memoryStream.ToArray()).ConfigureAwait(false); } - //读取文件保存的根目录 - string fileSaveRootDir = ConfigDirHelper.GetAppSetting("App", "FileRootPath"); - //读取WMS文件保存的模块的根目录 - string fileSaveDir = ConfigDirHelper.GetAppSetting("App", "WMSFiles"); - //文件保存的相对文件夹(保存到wwwroot目录下) - string absoluteFileDir = fileSaveRootDir + @"\" + fileSaveDir; - //文件保存的路径(应用的工作目录+文件夹相对路径); - string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container" + absoluteFileDir; - var filePath = fileSavePath + getFileName;//获取到导入的excel - var import = await _importer.Import(filePath); + ////读取文件保存的根目录 + //string fileSaveRootDir = ConfigDirHelper.GetAppSetting("App", "FileRootPath"); + ////读取WMS文件保存的模块的根目录 + //string fileSaveDir = ConfigDirHelper.GetAppSetting("App", "WMSFiles"); + ////文件保存的相对文件夹(保存到wwwroot目录下) + //string absoluteFileDir = fileSaveRootDir + @"\" + fileSaveDir; + ////文件保存的路径(应用的工作目录+文件夹相对路径); + //string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container" + absoluteFileDir; + //var filePath = fileSavePath + getFileName;//获取到导入的excel + var import = await _importer.Import((await fc.GetAsync(FileOriginName).ConfigureAwait(false))); if (import.Exception != null) { if (import.Exception.Message.ToString() == "导入文件不存在!")