diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotBase.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotBase.cs index e80d2693..1ce05ef1 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotBase.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/BookingSlot/BookingSlotBase.cs @@ -442,5 +442,10 @@ namespace DS.WMS.Core.Op.Entity [SqlSugar.SugarColumn(ColumnDescription = "状态名称", Length = 20, IsNullable = true)] public string StatusName { get; set; } + /// + /// 委托编号 + /// + [SqlSugar.SugarColumn(ColumnDescription = "委托编号", Length = 20, IsNullable = true)] + public string CustomerNo { get; set; } } } diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs index f274c4d1..a9110ef2 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/BookingSlot/BookingSlotService.cs @@ -3113,6 +3113,22 @@ namespace DS.WMS.Core.Op.Method Logger.Log(NLog.LogLevel.Info, $"引入失败,更新海运出口失败,原因:{saveSeaExportRlt.Message}"); } + //这里生成完订单后,需要将订单的委托号回填到舱位上 + var order = tenantDb.Queryable().Where(x => x.Id == model.bookingOrderId).First(); + + //这里把订单的委托号同步到舱位 + if (order != null) + { + foreach (var slot in latestSlotList) + { + slot.CustomerNo = order.CustomerNo; + + tenantDb.Updateable(slot).UpdateColumns(x => new + { + x.CustomerNo + }).ExecuteCommand(); + } + } // if (generateModel.CtnList == null) //{