diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 9f20c82d..6ae77c2e 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -272,13 +272,21 @@ namespace Myshipping.Application { throw Oops.Bah("主单不需要填写分单号"); } + if (string.IsNullOrWhiteSpace(input.MBLNO)) + { + throw Oops.Bah("请填写提单号!"); + } } else { - if (!string.IsNullOrWhiteSpace(input.MBLNO)) + if (string.IsNullOrWhiteSpace(input.MBLNO)) { throw Oops.Bah("请填写主提单号"); } + if (string.IsNullOrWhiteSpace(input.HBLNO)) + { + throw Oops.Bah("请填写分提单号"); + } } @@ -359,13 +367,21 @@ namespace Myshipping.Application { throw Oops.Bah("主单不需要填写分单号"); } + if (string.IsNullOrWhiteSpace(input.MBLNO)) + { + throw Oops.Bah("请填写提单号!"); + } } else { - if (!string.IsNullOrWhiteSpace(input.MBLNO)) + if (string.IsNullOrWhiteSpace(input.MBLNO)) { throw Oops.Bah("请填写主提单号"); } + if (string.IsNullOrWhiteSpace(input.HBLNO)) + { + throw Oops.Bah("请填写分提单号"); + } } JsonUtil.PropToUpper(input, "ORDNO", "BSSTATUS", "YardContract", "YardContractTel", "YardContractEmail"); JsonUtil.TrimFields(input); @@ -606,7 +622,8 @@ namespace Myshipping.Application FilePath = fileRelaPath, TypeCode = dto.TypeCode, TypeName = dto.TypeName, - BookingId = dto.BookingId + BookingId = dto.BookingId, + }; await _bookingfile.InsertAsync(newFile); using (var stream = File.Create(fileAbsPath))