diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index dd06eb02..9331d5fc 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -7471,7 +7471,17 @@ namespace Myshipping.Application throw Oops.Bah("集装箱包装和订舱包装不一致,请修改"); } - //增加件、重、尺比对 + //如果合同协议号不为空需要判断是否字符前、后有空格,不允许字符前后有空格,需要提示修改 + if (string.IsNullOrWhiteSpace(order.CONTRACTNO)) + { + if(order.CONTRACTNO.StartsWith(" ")) + throw Oops.Bah("运费协议号前含有空格,请修改"); + + if (order.CONTRACTNO.EndsWith(" ")) + throw Oops.Bah("运费协议号后含有空格,请修改"); + } + + //增加件、重、尺比对 if (ctnList != null && ctnList.Count > 0) { if (ctnList.Sum(a => a.PKGS.HasValue ? a.PKGS.Value : 0) != (order.PKGS.HasValue ? order.PKGS.Value : 0))