新增现舱的引入功能

usertest
jianghaiqing 4 months ago
parent 25072a8148
commit 22e8fdaf61

@ -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
{
/// <summary>
/// 引入现舱请求
/// </summary>
public class BringInBookingSlotReq
{
/// <summary>
/// 海运出口主键
/// </summary>
public long seaExportId { get; set; }
/// <summary>
/// 现舱详情列表
/// </summary>
public List<BookingSlotBaseWithCtnDto> slots { get; set; }
}
}

@ -250,5 +250,12 @@ namespace DS.WMS.Core.Op.Interface
/// <param name="querySearch">查询条件</param>
/// <returns></returns>
Task<DataResult<List<BookingSlotBaseWithCtnDto>>> GetAvailableBookingSlots(PageRequest querySearch);
/// <summary>
/// 引入现舱关联海运出口
/// </summary>
/// <param name="model">请求参数</param>
/// <returns></returns>
Task<DataResult<string>> BringInBookingSlotToOrder(BringInBookingSlotReq model);
}
}

@ -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<List<BookingSlotBaseWithCtnDto>>.FailedData(baseList);
}
#endregion
#region 引入现舱关联海运出口
/// <summary>
/// 引入现舱关联海运出口
/// </summary>
/// <param name="model">请求参数</param>
/// <returns></returns>
public async Task<DataResult<string>> 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

@ -394,10 +394,24 @@ namespace DS.WMS.OpApi.Controllers
/// <returns></returns>
[HttpPost]
[Route("GetAvailableBookingSlots")]
public async Task<DataResult<List<BookingSlotBaseWithCtnDto>>> GetAvailableBookingSlots(PageRequest querySearch)
public async Task<DataResult<List<BookingSlotBaseWithCtnDto>>> GetAvailableBookingSlots([FromBody] PageRequest querySearch)
{
return await _bookingSlotService.GetAvailableBookingSlots(querySearch);
}
#endregion
#region 引入现舱关联海运出口
/// <summary>
/// 引入现舱关联海运出口
/// </summary>
/// <param name="model">请求参数</param>
/// <returns></returns>
[HttpPost]
[Route("BringInBookingSlotToOrder")]
public async Task<DataResult<string>> BringInBookingSlotToOrder([FromBody] BringInBookingSlotReq model)
{
return await _bookingSlotService.BringInBookingSlotToOrder(model);
}
#endregion
}
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NameOfLastUsedPublishProfile>D:\Source\Repos\DS8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
</PropertyGroup>

Loading…
Cancel
Save