From 517985bde569bc889ddfe0f9e6dd388f16cb1b75 Mon Sep 17 00:00:00 2001 From: wanghaomei <86whm@163.com> Date: Wed, 8 May 2024 08:50:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingCustomerOrderService.cs | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs index 740c79a4..475b711d 100644 --- a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs +++ b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs @@ -908,10 +908,10 @@ namespace Myshipping.Application throw Oops.Bah("未找到数据"); } - if (model.BSSTATUS != "已提交") - { - throw Oops.Bah("当前状态不能接受审核回推"); - } + //if (model.BSSTATUS != "已提交") + //{ + // throw Oops.Bah("当前状态不能接受审核回推"); + //} if (recModel.Accept) { @@ -1669,6 +1669,8 @@ namespace Myshipping.Application SaveAuditLog($"待审核", order.Id); } + _logger.LogInformation($"rtnList:{rtnList.ToJsonString()}"); + //全部成功后,才能自动订舱和审核 if (rtnList.Count(x => x.Success == false) == 0) { @@ -1686,12 +1688,12 @@ namespace Myshipping.Application { foreach (var ordId in ordIdList) { + var succ = false; try { _logger.LogInformation($"自动订舱:{ordId}"); await PostApiSO(ordId); - _logger.LogInformation($"自动审核:{ordId}"); - await AuditBooking(ordId, true, "系统自动审核"); + succ = true; } catch (Exception ex) { @@ -1699,6 +1701,12 @@ namespace Myshipping.Application await AuditBooking(ordId, false, ex.Message, notFeedback: true); throw ex; } + + if (succ) + { + _logger.LogInformation($"自动审核:{ordId}"); + await AuditBooking(ordId, true, "系统自动审核"); + } } } }