From 012983a7a0e11ff7944146ab26256c6925fc95e7 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Mon, 21 Nov 2022 17:23:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingOrderService.cs | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) 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))