|
|
@ -2595,7 +2595,16 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Directory.CreateDirectory(fileFullPath);
|
|
|
|
Directory.CreateDirectory(fileFullPath);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fileName = $"{order.MBLNO}_{DateTime.Now.Ticks}" + ".xls";//名称
|
|
|
|
|
|
|
|
|
|
|
|
//2023-4-3,根据河川操作要求,文件名只带提单号
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(order.MBLNO))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fileName = $"{order.MBLNO}.xls";//名称
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
fileName = $"{order.Id}_{DateTime.Now.Ticks}.xls";//名称
|
|
|
|
|
|
|
|
}
|
|
|
|
_logger.LogInformation("导出excel:" + Path.Combine(fileFullPath, fileName));
|
|
|
|
_logger.LogInformation("导出excel:" + Path.Combine(fileFullPath, fileName));
|
|
|
|
var filestream = new FileStream(Path.Combine(fileFullPath, fileName), FileMode.OpenOrCreate, FileAccess.ReadWrite);
|
|
|
|
var filestream = new FileStream(Path.Combine(fileFullPath, fileName), FileMode.OpenOrCreate, FileAccess.ReadWrite);
|
|
|
|
excelwork.Write(filestream);
|
|
|
|
excelwork.Write(filestream);
|
|
|
|