diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index 68bb5c27..9baf3d2b 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -4989,11 +4989,12 @@ 船公司ID 返回适用的路由枚举 - + 上传ocr文件 + 订舱id diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index f9618ccd..26585db4 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -892,8 +892,8 @@ namespace Myshipping.Application { BusinessId = BusinessId, MBLNO = MBLNO, - YARD = YARD==""?null: YARD, - YardCode = YARDID == ""? null: YARDID, + YARD = YARD == "" ? null : YARD, + YardCode = YARDID == "" ? null : YARDID, CARRIER = CARRIER == "" ? null : CARRIER, CARRIERID = CARRIERID == "" ? null : CARRIERID, isBook = isbook @@ -2806,9 +2806,10 @@ namespace Myshipping.Application /// 上传ocr文件 /// /// + /// 订舱id /// [HttpPost("/BookingOrder/OcrUpFile")] - public async Task OcrUpFile(IFormFile file) + public async Task OcrUpFile(IFormFile file, long bookingId) { //未上传文件 if (file == null || file.Length == 0) @@ -2816,6 +2817,14 @@ namespace Myshipping.Application throw Oops.Bah("未上传文件"); } + //保存到订舱 + await AddFile(file, new BookingFileDto() + { + BookingId = bookingId, + TypeCode = "other", + TypeName = "其他" + }); + var originalFilename = file.FileName; // 文件原始名称 var fileSuffix = Path.GetExtension(file.FileName).ToLower(); // 文件后缀