From da87e104b039928e1ad85d88a478bf3532d3a88c Mon Sep 17 00:00:00 2001 From: cjy Date: Wed, 4 Sep 2024 09:06:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=AE=B1=E5=B0=8F=E7=A5=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Op/Method/SeaExportTxxpService.cs | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportTxxpService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportTxxpService.cs index b8756406..ff391634 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportTxxpService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportTxxpService.cs @@ -32,17 +32,7 @@ namespace DS.WMS.Core.Op.Method if (order == null) { return await Task.FromResult(DataResult.Failed("海运出口信息不存在!", MultiLanguageConst.SeaExportNotExist)); - } - - var orderUrl = tenantDb.Queryable().First(x => x.BusinessId == bookingId); - if (orderUrl == null) - { - orderUrl = new BookingOrderUrl() - { - BusinessId = bookingId - }; - await tenantDb.Insertable(orderUrl).ExecuteCommandAsync(); - } + } //校验船公司 if (string.IsNullOrEmpty(order.Carrier)||order.CarrierId == 0 || order.CarrierId.IsNull()) @@ -161,7 +151,15 @@ namespace DS.WMS.Core.Op.Method { return await Task.FromResult(DataResult.Failed(jobjResp.GetStringValue("message"))); } - + var orderUrl = tenantDb.Queryable().First(x => x.BusinessId == bookingId); + if (orderUrl == null) + { + orderUrl = new BookingOrderUrl() + { + BusinessId = bookingId + }; + await tenantDb.Insertable(orderUrl).ExecuteCommandAsync(); + } var addUrlFlag = string.IsNullOrEmpty(orderUrl.UrlTxxp) ? true : false; //新生成还是更新链接 //保存url