导表修改
This commit is contained in:
@@ -117,7 +117,7 @@ public static class ExcelExportHelper
|
||||
|
||||
|
||||
|
||||
var (physicalPath, fileNmae) = await FileStoreHelper.GetCommonDocPhysicalFilePathAsync(_hostEnvironment, _commonDocumentRepository, code);
|
||||
var (physicalPath, fileName) = await FileStoreHelper.GetCommonDocPhysicalFilePathAsync(_hostEnvironment, _commonDocumentRepository, code);
|
||||
|
||||
|
||||
//模板路径
|
||||
@@ -157,7 +157,7 @@ public static class ExcelExportHelper
|
||||
}
|
||||
|
||||
// 文件名称 从sheet里面取
|
||||
fileNmae = workbook.GetSheetName(0);
|
||||
//fileNmae = workbook.GetSheetName(0);
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ public static class ExcelExportHelper
|
||||
|
||||
return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
{
|
||||
FileDownloadName = $"{exportFileNamePrefix}_{fileNmae/*.Substring(0, fileNmae.LastIndexOf('.'))*/}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"
|
||||
FileDownloadName = $"{exportFileNamePrefix}_{fileName}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"
|
||||
};
|
||||
|
||||
#endregion
|
||||
@@ -328,7 +328,7 @@ public static class ExcelExportHelper
|
||||
}
|
||||
|
||||
// 文件名称 从sheet里面取
|
||||
fileName = workbook.GetSheetName(0);
|
||||
//fileName = workbook.GetSheetName(0);
|
||||
#endregion
|
||||
|
||||
#region MiniExcel
|
||||
|
||||
@@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Configuration;
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace IRaCIS.Core.Application.Helper;
|
||||
@@ -194,6 +195,7 @@ public static class FileStoreHelper
|
||||
{
|
||||
var doc = await _commonDocumentRepository.FirstOrDefaultAsync(t => t.Code == code);
|
||||
|
||||
var isEn_US = CultureInfo.CurrentCulture.Name!= "zh-CN";
|
||||
if (doc == null)
|
||||
{
|
||||
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
|
||||
@@ -208,7 +210,7 @@ public static class FileStoreHelper
|
||||
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
|
||||
}
|
||||
|
||||
return (filePath, doc.Name.Trim('/'));
|
||||
return (filePath, isEn_US? doc.Name.Trim('/'): doc.NameCN.Trim('/'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user