using Azure.Storage.Blobs.Models;
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.Module.DjyServiceStatus;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Owin.Security.Provider;
using Org.BouncyCastle.Crypto;
using SqlSugar;
namespace DS.WMS.OpApi.Controllers
{
///
/// 舱位管理
///
public class BookingSlotServiceController : ApiController
{
private readonly IBookingSlotService _bookingSlotService;
///
///
///
///
public BookingSlotServiceController(IBookingSlotService bookingSlotService)
{
_bookingSlotService = bookingSlotService;
}
#region 舱位接收保存、取消接口
///
/// 舱位接收保存、取消接口
///
/// 请求详情(JSON)
/// BC附件
/// BC修改附件
///
[HttpPost]
[Route("ApiReceive")]
public async Task> ApiReceive(string jsonData, IFormFile file = null, IFormFile modifyFile = null)
{
return await _bookingSlotService.ApiReceive(jsonData, null, null);
}
#endregion
#region 获取舱位详情
///
/// 获取舱位详情
///
/// 舱位ID
/// 返回详情
[HttpGet]
[Route("Detail")]
public async Task> Detail([FromQuery] long id)
{
return await _bookingSlotService.Detail(id);
}
#endregion
#region 查询可用的舱位及箱子列表
///
/// 查询可用的舱位及箱子列表
///
/// 筛选条件1:舱位信息、箱型
/// 筛选条件2:舱位主键列表
/// 筛选条件3:分页
/// 可用的舱位列表(含可用的箱子列表)
[HttpPost]
[Route("GetAvailableSlots")]
public async Task>> GetAvailableSlots([FromBody] BookingSlotBaseDto slotInput )
{
return await _bookingSlotService.GetAvailableSlots(slotInput, null, null);
}
#endregion
#region 检查指定订舱记录,是否可以引入舱位列表
///
/// 检查指定订舱记录,是否可以引入舱位列表
///
/// 待引入的舱位列表
/// 返回回执
[HttpPost]
[Route("CheckImportSlots")]
public async Task CheckImportSlots([FromBody] List slots)
{
return null;//await _bookingSlotService.CheckImportSlots(slots, 0);
}
#endregion
#region 为指定订舱记录引入舱位信息
///
/// 为指定订舱记录引入舱位信息
///
/// 引入舱位参数
/// (是否成功,提示消息)
[HttpPost]
[Route("ImportSlots")]
public async Task> ImportSlots([FromBody] ImportSlotsDto model)
{
return await _bookingSlotService.ImportSlots(model);
}
#endregion
#region 舱位库存台账
///
/// 舱位库存台账
///
/// 请求参数
/// 返回列表
[HttpPost]
[Route("PageStock")]
public async Task>> PageStock([FromBody] PageRequest querySearch)
{
return await _bookingSlotService.GetPageStockAsync(querySearch);
}
#endregion
#region 舱位库存刷新
///
/// 舱位库存刷新
///
/// 请求参数
/// 返回列表
[HttpPost]
[Route("RefreshStock")]
public async Task> RefreshStock([FromBody] BookingSlotStockUpdateModel input)
{
return await _bookingSlotService.RefreshStock(input);
}
#endregion
#region 保存舱位
///
/// 保存舱位
///
/// 舱位详情
/// 返回输出
[HttpPost]
[Route("Save")]
public async Task> Save([FromBody] BookingSlotBaseSaveInput input)
{
return await _bookingSlotService.Save(input);
}
#endregion
#region 获取附件
///
/// 获取附件
///
/// 舱位主键
/// 返回附件列表
[HttpGet]
[Route("GetFile")]
public async Task>> GetFile([FromQuery] long id)
{
return await _bookingSlotService.GetFile(id);
}
#endregion
#region 分页查询订舱舱位
///
/// 舱位台账查询
///
/// 查询条件
///
[HttpPost]
[Route("GetPage")]
public async Task>> GetPageAsync(PageRequest querySearch)
{
return await _bookingSlotService.GetPageAsync(querySearch);
}
#endregion
#region 获取舱位变更比对结果
///
/// 获取舱位变更比对结果
///
/// 舱位主键
/// 批次号
/// 返回舱位变更比对结果
[HttpGet]
[Route("GetSlotCompareResult")]
public async Task>> GetSlotCompareResult([FromQuery] long id, [FromQuery] string batchNo)
{
return null;//await _bookingSlotService.GetSlotCompareResult(id, batchNo);
}
#endregion
#region 导入舱位
///
/// 导入舱位
///
/// 导入舱位文件
/// 返回回执
[HttpPost]
[Route("ImportSlotFromFile")]
public async Task ImportSlotFromFile([FromBody] IFormFile file)
{
return null;//await _bookingSlotService.ImportSlotFromFile(file);
}
#endregion
#region 生成订舱订单
///
/// 生成订舱订单
///
/// 生成订舱订单请求
/// 返回回执
[HttpPost]
[Route("CreateBookingOrder")]
public async Task CreateBookingOrder([FromBody] BookingGenerateDto model)
{
return null;// await _bookingSlotService.CreateBookingOrder(model);
}
#endregion
#region 检索舱位对应的订舱订单(BY 舱位主键)
///
/// 检索舱位对应的订舱订单(BY 舱位主键)
///
///
/// 返回回执
[HttpGet]
[Route("SearchBookingSlotWithOrderById")]
public async Task> SearchBookingSlotWithOrderById([FromQuery] long id)
{
return await _bookingSlotService.SearchBookingSlotWithOrderById(id);
}
#endregion
#region 检索舱位对应的订舱订单(BY 订舱编号)
///
/// 检索舱位对应的订舱订单(BY 订舱编号)
///
/// 订舱编号
/// 租户ID
/// 返回回执
[HttpGet]
[Route("SearchBookingSlotWithOrderByNo")]
public async Task> SearchBookingSlotWithOrderByNo([FromQuery] string slotBookingNo, [FromQuery] long tenantId)
{
return null; //await _bookingSlotService.SearchBookingSlotWithOrderByNo(slotBookingNo, tenantId);
}
#endregion
#region 请求BC比对
///
/// 请求BC比对
///
/// BC详情
/// 返回回执
[HttpPost]
[Route("ExcuteCompare")]
public async Task> ExcuteCompare([FromBody] ParserBCInfoDto bcSrcDto)
{
return null;// await _bookingSlotService.ExcuteCompare(bcSrcDto, null);
}
#endregion
#region 推送BC变更比对
///
/// 推送BC变更比对
///
/// 原舱位详情
///
[HttpPost]
[Route("PushCompareBCInfo")]
public async Task> PushCompareBCInfo([FromBody] ParserBCInfoDto bcSrcDto)
{
return null;// _bookingSlotService.PushCompareBCInfo(bcSrcDto, null, 0, "");
}
#endregion
#region 估算差异重要提醒
///
/// 估算差异重要提醒
///
/// 原舱位详情
/// 新舱位详情
/// 舱位ID
///
[HttpPost]
[Route("MeasureDiffCautionTask")]
public async Task MeasureDiffCautionTask([FromBody] ParserBCInfoDto bcSrcDto)
{
return null;// await _bookingSlotService.MeasureDiffCautionTask(bcSrcDto, null, 0);
}
#endregion
#region 订舱编号检索舱位信息
///
/// 订舱编号检索舱位信息
///
/// 订舱编号
/// 船公司ID
///
[HttpGet]
[Route("QueryBookingSlot")]
public async Task> QueryBookingSlot([FromQuery] string slotBookingNo, [FromQuery] string CarrierId)
{
return null;// await _bookingSlotService.QueryBookingSlot(slotBookingNo, CarrierId);
}
#endregion
#region 获取舱位详情列表
///
/// 获取舱位详情列表
///
/// 舱位ID组
/// 返回舱位详情
[HttpPost]
[Route("GetSlotList")]
public async Task>> GetSlotList([FromBody] long[] ids)
{
return null;// await _bookingSlotService.GetSlotList(ids);
}
#endregion
#region 获取合票详情(生成合票需要先调此方法)
///
/// 获取合票详情(生成合票需要先调此方法)
///
///
///
[HttpPost]
[Route("GetMergeList")]
public async Task> GetMergeList([FromBody] QueryMergeSlotDto model)
{
return null;// await _bookingSlotService.GetMergeList(model);
}
#endregion
#region 生成合票订舱订单
///
/// 生成合票订舱订单
///
/// 生成订舱订单请求
/// 返回回执
[HttpPost]
[Route("MergeCreateBookingOrder")]
public async Task> MergeCreateBookingOrder([FromBody] BookingGenerateDto model)
{
return null;// await _bookingSlotService.MergeCreateBookingOrder(model);
}
#endregion
}
}