diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/BookingSlot/BringInBookingSlotReq.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/BookingSlot/BringInBookingSlotReq.cs
new file mode 100644
index 00000000..f87e3ed7
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/BookingSlot/BringInBookingSlotReq.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DS.WMS.Core.Op.Dtos
+{
+ ///
+ /// 引入现舱请求
+ ///
+ public class BringInBookingSlotReq
+ {
+ ///
+ /// 海运出口主键
+ ///
+ public long seaExportId { get; set; }
+
+ ///
+ /// 现舱详情列表
+ ///
+ public List slots { get; set; }
+ }
+}
diff --git a/ds-wms-service/DS.WMS.Core/Op/Interface/BookingSlot/IBookingSlotService.cs b/ds-wms-service/DS.WMS.Core/Op/Interface/BookingSlot/IBookingSlotService.cs
index 53b00186..42e5f582 100644
--- a/ds-wms-service/DS.WMS.Core/Op/Interface/BookingSlot/IBookingSlotService.cs
+++ b/ds-wms-service/DS.WMS.Core/Op/Interface/BookingSlot/IBookingSlotService.cs
@@ -250,5 +250,12 @@ namespace DS.WMS.Core.Op.Interface
/// 查询条件
///
Task>> GetAvailableBookingSlots(PageRequest querySearch);
+
+ ///
+ /// 引入现舱关联海运出口
+ ///
+ /// 请求参数
+ ///
+ Task> BringInBookingSlotToOrder(BringInBookingSlotReq model);
}
}
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 f5a20508..6206ff23 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
@@ -51,6 +51,7 @@ using DS.Module.Core.Constants;
using DS.Module.Core.Data;
using DS.WMS.Core.TaskPlat.Dtos;
using NPOI.XSSF.UserModel;
+using AngleSharp.Dom;
namespace DS.WMS.Core.Op.Method
{
@@ -4067,6 +4068,61 @@ namespace DS.WMS.Core.Op.Method
return DataResult>.FailedData(baseList);
}
#endregion
+
+ #region 引入现舱关联海运出口
+ ///
+ /// 引入现舱关联海运出口
+ ///
+ /// 请求参数
+ ///
+ public async Task> BringInBookingSlotToOrder(BringInBookingSlotReq model)
+ {
+ /*
+ 1、提取海运出口的订舱详情
+ 2、触发舱位的关联订舱
+ */
+
+ if(model.seaExportId == 0)
+ {
+ throw new Exception($"海运出口主键不能为空");
+ }
+
+ SeaExportRes orderInfo = null;
+
+ var orderRlt = _seaExportService.GetSeaExportInfo(model.seaExportId.ToString());
+
+ if (orderRlt.Succeeded)
+ {
+ orderInfo = orderRlt.Data;
+ }
+
+ var generateDto = new BookingGenerateDto()
+ {
+ CustomerId = orderInfo.CustomerId,
+ CustomerName = orderInfo.CustomerName,
+ CustServiceId = orderInfo.CustomerService,
+ CustServiceName = orderInfo.CustomerServiceName,
+ SaleId = orderInfo.SaleId,
+ SaleName = orderInfo.Sale,
+ GOODSNAME = orderInfo.GoodsName,
+ };
+
+ if (model.slots.Any(k => k.SplitOrMerge == 1 || k.SplitOrMerge == 2))
+ {
+ generateDto.BookingReferNo = orderInfo.OrderNo;
+ generateDto.NewMBlNo = orderInfo.MBLNO;
+ generateDto.NewSubBlNo = orderInfo.HBLNO;
+ }
+
+ return await ImportSlots(new ImportSlotsDto{
+ slots = model.slots,
+ isCheck = false,
+ bookingOrderId = model.seaExportId,
+ generateModel = generateDto
+
+ });
+ }
+ #endregion
}
public static class LetterIndexUtil
diff --git a/ds-wms-service/DS.WMS.OpApi/Controllers/BookingSlotServiceController.cs b/ds-wms-service/DS.WMS.OpApi/Controllers/BookingSlotServiceController.cs
index 09160f1d..b73ae08e 100644
--- a/ds-wms-service/DS.WMS.OpApi/Controllers/BookingSlotServiceController.cs
+++ b/ds-wms-service/DS.WMS.OpApi/Controllers/BookingSlotServiceController.cs
@@ -394,10 +394,24 @@ namespace DS.WMS.OpApi.Controllers
///
[HttpPost]
[Route("GetAvailableBookingSlots")]
- public async Task>> GetAvailableBookingSlots(PageRequest querySearch)
+ public async Task>> GetAvailableBookingSlots([FromBody] PageRequest querySearch)
{
return await _bookingSlotService.GetAvailableBookingSlots(querySearch);
}
#endregion
+
+ #region 引入现舱关联海运出口
+ ///
+ /// 引入现舱关联海运出口
+ ///
+ /// 请求参数
+ ///
+ [HttpPost]
+ [Route("BringInBookingSlotToOrder")]
+ public async Task> BringInBookingSlotToOrder([FromBody] BringInBookingSlotReq model)
+ {
+ return await _bookingSlotService.BringInBookingSlotToOrder(model);
+ }
+ #endregion
}
}
diff --git a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user
index fb7be066..da141c5a 100644
--- a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user
+++ b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user
@@ -1,7 +1,7 @@
- D:\Source\Repos\DS8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml
+ E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml
MvcControllerEmptyScaffolder
root/Common/MVC/Controller