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