修改INTTRA

dev
jianghaiqing 3 months ago
parent 8c2a0eeb80
commit c81123d5e6

@ -1810,6 +1810,7 @@ namespace DS.WMS.Core.Op.Method
FilePath = filePath, FilePath = filePath,
}; };
return await Task.FromResult(DataResult<OpFileDownLoadRes>.Success(data)); return await Task.FromResult(DataResult<OpFileDownLoadRes>.Success(data));
} }
#endregion #endregion
#region 检查订舱、截单EDI订单信息 #region 检查订舱、截单EDI订单信息

@ -14,6 +14,8 @@ using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json; using Newtonsoft.Json;
using NPOI.XWPF.UserModel; using NPOI.XWPF.UserModel;
using Org.BouncyCastle.Ocsp; using Org.BouncyCastle.Ocsp;
using SharpCompress.Common;
using System.IO;
using System.Net; using System.Net;
namespace DS.WMS.OpApi.Controllers; namespace DS.WMS.OpApi.Controllers;
@ -288,12 +290,14 @@ public class SeaExportController : ApiController
var path = res.Data.FilePath; var path = res.Data.FilePath;
var fileName = res.Data.FileName; var fileName = res.Data.FileName;
byte[] byteArr = System.IO.File.ReadAllBytes(res.Data.FilePath); //byte[] byteArr = System.IO.File.ReadAllBytes(res.Data.FilePath);
string mimeType = "application/octet-stream"; //string mimeType = "application/octet-stream";
return new FileContentResult(byteArr, mimeType) //return new FileContentResult(byteArr, mimeType)
{ //{
FileDownloadName = fileName // FileDownloadName = fileName
}; //};
return new FileStreamResult(new FileStream(path, FileMode.Open), "application/octet-stream") { FileDownloadName = fileName };
} }
/// <summary> /// <summary>

Loading…
Cancel
Save