From 65f60ddca4320eb15657cef52f6af34ae4271f93 Mon Sep 17 00:00:00 2001 From: zhangxiaofeng <1939543722@qq.com> Date: Wed, 7 Aug 2024 10:08:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E8=AE=A2=E8=88=B1=E6=95=B0=E6=8D=AE=E6=97=B6=EF=BC=8C=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E5=B7=B2=E5=88=A0=E9=99=A4=E5=8D=95=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingCustomerOrderService.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs index 87c9742f..f8d96b62 100644 --- a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs +++ b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs @@ -1280,7 +1280,23 @@ namespace Myshipping.Application var dbOrder = await _repOrder.AsQueryable().Filter(null, true).FirstAsync(x => !x.IsDeleted && x.Id == recModel.Order.Id); if (dbOrder == null) { - throw Oops.Bah($"未找到id为{recModel.Order.Id}的数据"); + if (syncType == BookingOrderSyncTypeEnum.BC.ToString()) + { + dbOrder = await _repOrder.AsQueryable().Filter(null, true).FirstAsync(x => x.IsDeleted && x.Id == recModel.Order.Id); + if (dbOrder == null) + { + throw Oops.Bah($"未找到id为{recModel.Order.Id}的数据"); + } + else + { + dbOrder.IsDeleted = false; + _logger.LogInformation($"从已删除订单中找到:{recModel.Order.Id},恢复为未删除"); + } + } + else + { + throw Oops.Bah($"未找到id为{recModel.Order.Id}的数据"); + } } if (!string.IsNullOrEmpty(dbOrder.MBLNO)) //提单号不覆盖