|
|
|
@ -41,10 +41,11 @@ using DS.WMS.Core.Info.Dtos;
|
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
|
using AngleSharp.Dom.Events;
|
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
|
public class BookingSlotService //: IBookingSlotService
|
|
|
|
|
public class BookingSlotService : IBookingSlotService
|
|
|
|
|
{
|
|
|
|
|
private readonly IServiceProvider _serviceProvider;
|
|
|
|
|
private readonly ISqlSugarClient db;
|
|
|
|
@ -2523,6 +2524,150 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
return (true, "引入成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 检索舱位对应的订舱订单(BY 舱位主键)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">舱位ID</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
public async Task<BookingSlotWithOrderDto> SearchBookingSlotWithOrderById(long id)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 刷新库存
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task RefreshStock(BookingSlotStockUpdateModel input)
|
|
|
|
|
{
|
|
|
|
|
//input.TenantId = UserManager.TENANT_ID;
|
|
|
|
|
//更新库存
|
|
|
|
|
//await _publisher.PublishAsync(new ChannelEventSource("BookingSlotStock:Update", input));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 订舱编号检索舱位信息
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 订舱编号检索舱位信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="slotBookingNo">订舱编号</param>
|
|
|
|
|
/// <param name="CarrierId">船公司ID</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task<long> QueryBookingSlot(string slotBookingNo, string CarrierId)
|
|
|
|
|
{
|
|
|
|
|
long id = 0;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
var model = tenantDb.Queryable<BookingSlotBase>().First(x => x.SlotBookingNo == slotBookingNo && x.CarrierCode == CarrierId);
|
|
|
|
|
|
|
|
|
|
//if (model == null)
|
|
|
|
|
//throw Oops.Bah("舱位信息不存在");
|
|
|
|
|
|
|
|
|
|
id = model.Id;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
//_logger.LogInformation($"订舱编号检索舱位信息失败,原因:{ex.Message}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return id;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 库存查询
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task<dynamic> PageStock(BookingSlotStockPageInput input)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 生成合票订舱订单
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">生成订舱订单请求</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
public async Task<TaskManageOrderResultDto> MergeCreateBookingOrder(BookingGenerateDto model)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 估算差异重要提醒
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="bcSrcDto">原舱位详情</param>
|
|
|
|
|
/// <param name="bcTargetDto">新舱位详情</param>
|
|
|
|
|
/// <param name="slotId">舱位ID</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[NonAction]
|
|
|
|
|
public async Task MeasureDiffCautionTask(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto, long slotId)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 检索舱位对应的订舱订单(BY 订舱编号)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="slotBookingNo">订舱编号</param>
|
|
|
|
|
/// <param name="tenantId">租户ID</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
|
|
|
|
|
public async Task<BookingSlotWithOrderDto> SearchBookingSlotWithOrderByNo(string slotBookingNo, long tenantId)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 导入舱位
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="file">导入舱位文件</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
public async Task<TaskManageOrderResultDto> ImportSlotFromFile(IFormFile file)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Task<DataResult<List<BookingSlotBaseWithCtnDto>>> IBookingSlotService.GetAvailableSlots(BookingSlotBaseDto slotInput, List<long> slotIdListInput, PageWithTotal pageInfo)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Task<dynamic> IBookingSlotService.Page(BookingSlotBasePageInput input)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Task<long> IBookingSlotService.InnerApiReceive(BookingSlotBaseApiDto dto, DynameFileInfo file, DynameFileInfo modifyFile)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Task<List<CompareResultDetailInfo>> IBookingSlotService.GetSlotCompareResult(long id, string batchNo)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Task<TaskManageOrderResultDto> IBookingSlotService.CreateBookingOrder(BookingGenerateDto model)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Task<string> IBookingSlotService.ExcuteCompare(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Task<List<BookingSlotBaseSaveOutput>> IBookingSlotService.GetSlotList(long[] ids)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class LetterIndexUtil
|
|
|
|
|