From b34d7e63a539ff48668a2bd195b2c6f40006b3c6 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Wed, 31 May 2023 15:19:39 +0800 Subject: [PATCH 1/2] 1 --- .../Service/BookingOrder/BookingOrderService.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 4cf1674f..4b04cd01 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -336,11 +336,6 @@ namespace Myshipping.Application .WhereIF(!string.IsNullOrWhiteSpace(input.CUSTOMERNAME), u => u.CUSTOMERNAME.Contains(input.CUSTOMERNAME)) .WhereIF(input.CUSTOMERID != null && input.CUSTOMERID != 0, u => u.CUSTOMERID == input.CUSTOMERID) .WhereIF(!string.IsNullOrWhiteSpace(input.FORWARDER), u => u.FORWARDER.Contains(input.FORWARDER)) - .WhereIF(!string.IsNullOrWhiteSpace(input.CUSTSERVICE), u => u.CUSTSERVICE == input.CUSTSERVICE) - .WhereIF(!string.IsNullOrWhiteSpace(input.CUSTOMERNAME), u => u.CUSTOMERNAME == input.CUSTOMERNAME) - .WhereIF(!string.IsNullOrWhiteSpace(input.FORWARDER), u => u.FORWARDER == input.FORWARDER) - .WhereIF(!string.IsNullOrWhiteSpace(input.SHIPAGENCY), u => u.SHIPAGENCY == input.SHIPAGENCY) - .WhereIF(!string.IsNullOrWhiteSpace(input.CUSTOMSER), u => u.CUSTOMSER == input.CUSTOMSER) .WhereIF(!string.IsNullOrWhiteSpace(input.AGENTID), u => u.AGENTID == input.AGENTID) .WhereIF(!string.IsNullOrWhiteSpace(input.FORWARDERID), u => u.FORWARDERID == input.FORWARDERID) .WhereIF(!string.IsNullOrWhiteSpace(input.SHIPAGENCY), u => u.SHIPAGENCY.Contains(input.SHIPAGENCY)) @@ -350,7 +345,6 @@ namespace Myshipping.Application .WhereIF(!string.IsNullOrWhiteSpace(input.TRUCKER), u => u.TRUCKER.Contains(input.TRUCKER)) .WhereIF(!string.IsNullOrWhiteSpace(input.TRUCKERID), u => u.TRUCKERID == input.TRUCKERID) .WhereIF(!string.IsNullOrWhiteSpace(input.AGENTNAME), u => u.AGENTNAME.Contains(input.AGENTNAME)) - .WhereIF(!string.IsNullOrWhiteSpace(input.AGENTID), u => u.AGENTID == input.AGENTID) .WhereIF(!string.IsNullOrWhiteSpace(input.WEITUO), u => u.WEITUO.Contains(input.WEITUO)) .WhereIF(!string.IsNullOrWhiteSpace(input.SCACCODE), u => u.SCACCODE == input.SCACCODE) .WhereIF(!string.IsNullOrWhiteSpace(input.ITNCODE), u => u.ITNCODE == input.ITNCODE) From 6d1a0189b26af30a342c958e722ef7342d871ff8 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Wed, 31 May 2023 16:50:43 +0800 Subject: [PATCH 2/2] 1 --- .../Service/BookingOrder/BookingOrderService.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 721c5e3a..c0561324 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -6143,8 +6143,17 @@ namespace Myshipping.Application throw Oops.Bah($"请求爬虫获取【云港通】出错:{msg}"); } JArray jarrData = jobjRtn.GetValue("data") as JArray; + if (jarrData==null|| jarrData.Count==0) { + throw Oops.Bah($"请求爬虫获取数据为空{rtn}"); + + } JObject it = jarrData[0] as JObject; JArray array = it.GetValue("data") as JArray; + if (array == null || array.Count == 0) + { + throw Oops.Bah($"请求爬虫获取数据为空{rtn}"); + } + JObject item = array[0] as JObject; var yjdk_time = item.GetDateTimeValue("yjdk_time");//预计到港时间 var yjlk_time = item.GetDateTimeValue("yjlk_time");//预计离港时间