using Furion.FriendlyException; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Myshipping.Application.Entity; using Myshipping.Application.Event; using Myshipping.Application.Service.BookingSlot.Dto; using Myshipping.Core; using System.Collections.Generic; using System.Threading.Tasks; namespace Myshipping.Application { public interface IBookingSlotService { /// /// 舱位接收保存、取消接口 /// /// 请求详情 /// BC附件 /// BC变更附件 /// Task ApiReceive(string jsonData, IFormFile file = null, IFormFile modifyFile = null); Task Detail(long id); /// /// 查询可用的舱位及箱子列表 /// /// 筛选条件1:舱位信息、箱型 /// 筛选条件2:舱位主键列表 /// 筛选条件3:分页 /// 可用的舱位列表(含可用的箱子列表) Task> GetAvailableSlots(BookingSlotBaseDto slotInput = null, List slotIdListInput = null, PageWithTotal pageInfo = null); /// /// 检查指定订舱记录,是否可以引入舱位列表 /// /// 待引入的舱位列表 /// 待关联的订舱记录 /// (指定订舱记录是否已经引入过舱位数据,现有舱位及箱子是否满足需求,提示信息) Task<(bool isExists, bool isEnough, string message)> CheckImportSlots(List slots, long bookingOrderId); /// /// 为指定订舱记录引入舱位信息 /// /// 待引入的舱位列表 /// 待关联的订舱记录 /// 是否进行剩余量检查 /// 额外的用于生成管理记录的信息 /// (是否成功,提示消息) Task<(bool isSuccess, string message)> ImportSlots(List slots, long bookingOrderId, bool isCheck, BookingGenerateDto generateModel = null); Task PageStock(BookingSlotStockPageInput input); Task RefreshStock(BookingSlotStockUpdateModel input); Task Save(BookingSlotBaseSaveInput input); /// /// 获取附件 /// /// 舱位主键 /// 返回附件列表 Task> GetFile(long id); /// /// 分页查询订舱舱位 /// /// /// Task Page(BookingSlotBasePageInput input); /// /// 舱位接收保存、取消接口 /// /// /// /// /// Task InnerApiReceive(BookingSlotBaseApiDto dto, DynameFileInfo file = null, DynameFileInfo modifyFile = null); /// /// 获取舱位变更比对结果 /// /// 舱位主键 /// 批次号 /// 返回舱位变更比对结果 Task> GetSlotCompareResult(long id, string batchNo); /// /// 导入舱位 /// /// 导入舱位文件 /// 返回回执 Task ImportSlotFromFile(IFormFile file); /// /// 生成订舱订单 /// /// 生成订舱订单请求 /// 返回回执 Task CreateBookingOrder(BookingGenerateDto model); /// /// 检索舱位对应的订舱订单(BY 舱位主键) /// /// /// 返回回执 Task SearchBookingSlotWithOrderById(long id); /// /// 检索舱位对应的订舱订单(BY 订舱编号) /// /// 订舱编号 /// 租户ID /// 返回回执 Task SearchBookingSlotWithOrderByNo(string slotBookingNo, long tenantId); /// /// 请求BC比对 /// /// BC详情 /// BC变更后详情 /// 返回回执 Task ExcuteCompare(TaskBCInfoDto bcSrcDto, TaskBCInfoDto bcTargetDto); /// /// 推送BC变更比对 /// /// 原舱位详情 /// 变更后舱位详情 /// 舱位主键 /// 请求批次号用来区分对应的哪个批次任务 /// Task PushCompareBCInfo(TaskBCInfoDto bcSrcDto, TaskBCInfoDto bcTargetDto, long slotId, string reqBatchNo); /// /// 估算差异重要提醒 /// /// 原舱位详情 /// 新舱位详情 /// 舱位ID /// Task MeasureDiffCautionTask(TaskBCInfoDto bcSrcDto, TaskBCInfoDto bcTargetDto, long slotId); /// /// 订舱编号检索舱位信息 /// /// 订舱编号 /// 船公司ID /// Task QueryBookingSlot(string slotBookingNo, string CarrierId); /// /// 获取舱位详情列表 /// /// 舱位ID组 /// 返回舱位详情 Task> GetSlotList(long[] ids); /// /// 获取合票详情(生成合票需要先调此方法) /// /// /// Task> GetMergeList(QueryMergeSlotDto model); /// /// 生成合票订舱订单 /// /// 生成订舱订单请求 /// 返回回执 Task MergeCreateBookingOrder(BookingGenerateMergeDto model); } }