|
|
@ -745,7 +745,7 @@ namespace Myshipping.Application
|
|
|
|
[HttpPost("/BookingOrder/AddFile")]
|
|
|
|
[HttpPost("/BookingOrder/AddFile")]
|
|
|
|
public async Task AddFile(IFormFile file, [FromForm] BookingFileDto dto)
|
|
|
|
public async Task AddFile(IFormFile file, [FromForm] BookingFileDto dto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//未上传打印模板文件
|
|
|
|
//未上传文件
|
|
|
|
if (file == null || file.Length == 0)
|
|
|
|
if (file == null || file.Length == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Bah(BookingErrorCode.BOOK200);
|
|
|
|
throw Oops.Bah(BookingErrorCode.BOOK200);
|
|
|
@ -893,8 +893,8 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BusinessId = BusinessId,
|
|
|
|
BusinessId = BusinessId,
|
|
|
|
MBLNO = MBLNO,
|
|
|
|
MBLNO = MBLNO,
|
|
|
|
YARD = YARD==""?null: YARD,
|
|
|
|
YARD = YARD == "" ? null : YARD,
|
|
|
|
YardCode = YARDID == ""? null: YARDID,
|
|
|
|
YardCode = YARDID == "" ? null : YARDID,
|
|
|
|
CARRIER = CARRIER == "" ? null : CARRIER,
|
|
|
|
CARRIER = CARRIER == "" ? null : CARRIER,
|
|
|
|
CARRIERID = CARRIERID == "" ? null : CARRIERID,
|
|
|
|
CARRIERID = CARRIERID == "" ? null : CARRIERID,
|
|
|
|
isBook = isbook
|
|
|
|
isBook = isbook
|
|
|
@ -2807,9 +2807,10 @@ namespace Myshipping.Application
|
|
|
|
/// 上传ocr文件
|
|
|
|
/// 上传ocr文件
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="file"></param>
|
|
|
|
/// <param name="file"></param>
|
|
|
|
|
|
|
|
/// <param name="bookingId">订舱id</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("/BookingOrder/OcrUpFile")]
|
|
|
|
[HttpPost("/BookingOrder/OcrUpFile")]
|
|
|
|
public async Task<string> OcrUpFile(IFormFile file)
|
|
|
|
public async Task<string> OcrUpFile(IFormFile file, long bookingId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//未上传文件
|
|
|
|
//未上传文件
|
|
|
|
if (file == null || file.Length == 0)
|
|
|
|
if (file == null || file.Length == 0)
|
|
|
@ -2817,6 +2818,14 @@ namespace Myshipping.Application
|
|
|
|
throw Oops.Bah("未上传文件");
|
|
|
|
throw Oops.Bah("未上传文件");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//保存到订舱
|
|
|
|
|
|
|
|
await AddFile(file, new BookingFileDto()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BookingId = bookingId,
|
|
|
|
|
|
|
|
TypeCode = "other",
|
|
|
|
|
|
|
|
TypeName = "其他"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var originalFilename = file.FileName; // 文件原始名称
|
|
|
|
var originalFilename = file.FileName; // 文件原始名称
|
|
|
|
var fileSuffix = Path.GetExtension(file.FileName).ToLower(); // 文件后缀
|
|
|
|
var fileSuffix = Path.GetExtension(file.FileName).ToLower(); // 文件后缀
|
|
|
|
|
|
|
|
|
|
|
|