|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using DS.WMS.Core.Op.Dtos;
|
|
|
|
|
using DS.WMS.Core.Op.Interface;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 预订舱马士基API合约订舱
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class SpaceBookingMSKAPIController : ApiController
|
|
|
|
|
{
|
|
|
|
|
private readonly ISpaceBookingMSKAPIService _spaceBookingMSKAPIService;
|
|
|
|
|
|
|
|
|
|
public SpaceBookingMSKAPIController(ISpaceBookingMSKAPIService spaceBookingMSKAPIService)
|
|
|
|
|
{
|
|
|
|
|
_spaceBookingMSKAPIService = spaceBookingMSKAPIService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 检索海运船期详情
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 检索海运船期详情
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">请求船期详情</param>
|
|
|
|
|
/// <returns>返回船期结果</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("SearchShipSailingSchedule")]
|
|
|
|
|
public async Task<DataResult<List<SearchShipSailingScheduleResultDto>>> SearchShipSailingSchedule(QueryShipSailingScheduleDto model)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.SearchShipSailingSchedule(model);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 发送马士基订舱请求
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发送马士基订舱请求
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">请求订舱详情</param>
|
|
|
|
|
/// <returns>返回检索结果</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("SendMSKBooking")]
|
|
|
|
|
public async Task<DataResult<MSKBookingResultDto>> SendMSKBooking(MSKBookingDto model)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.SendMSKBooking(model);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 检索商品名称
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 检索商品名称
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">请求详情</param>
|
|
|
|
|
/// <returns>返回检索结果</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("SearchCommodities")]
|
|
|
|
|
public async Task<DataResult<List<SearchCommodityResultDto>>> SearchCommodities(QueryCommoditiesDto model)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.SearchCommodities(model);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 检索始发地、目的港口信息
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 检索始发地、目的港口信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">请求详情</param>
|
|
|
|
|
/// <returns>返回检索结果</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("SearchLocations")]
|
|
|
|
|
public async Task<DataResult<List<QueryLocationsResultDto>>> SearchLocations(QueryLocationsDto model)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.SearchLocations(model);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 马士基API订舱台账
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="QuerySearch">查询条件</param>
|
|
|
|
|
/// <returns>返回台账列表</returns>
|
|
|
|
|
//Task<DataResult<List<BookingDeliveryRecordPageDto>>> GetPageAsync(PageRequest QuerySearch);
|
|
|
|
|
|
|
|
|
|
#region 获取马士基API订舱详情
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取马士基API订舱详情
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">马士基API订舱ID</param>
|
|
|
|
|
/// <returns>返回详情</returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetInfo")]
|
|
|
|
|
public async Task<DataResult<MSKBookingDto>> GetInfo(long id)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.GetInfo(id);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 保存
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 保存
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">请求订舱详情</param>
|
|
|
|
|
/// <returns>返回ID</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("Save")]
|
|
|
|
|
public async Task<DataResult<long>> Save([FromBody] MSKBookingDto model)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.Save(model);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 删除
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">请求订舱ID</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("Delete")]
|
|
|
|
|
public async Task<DataResult<string>> Delete(long id)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.Delete(id);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 批量发送API前调取校验预警
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 批量发送API前调取校验预警
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids">马士基API订舱ID组</param>
|
|
|
|
|
/// <returns>返回提示信息</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("CheckWarningBatchSend")]
|
|
|
|
|
public async Task<DataResult<string>> CheckWarningBatchSend([FromBody] long[] ids)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.CheckWarningBatchSend(ids);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 批量发送
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 批量发送
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids">马士基API订舱ID组</param>
|
|
|
|
|
/// <returns>返回执行结果消息</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("BatchSend")]
|
|
|
|
|
public async Task<DataResult<string>> BatchSend([FromBody] long[] ids)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.BatchSend(ids);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 批量复制前调取校验预警
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 批量复制前调取校验预警
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">马士基API批量复制指定数据</param>
|
|
|
|
|
/// <returns>返回提示信息</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("CheckWarningBatchCopy")]
|
|
|
|
|
public async Task<DataResult<string>> CheckWarningBatchCopy(MSKAPIBookingCopyDto model)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.CheckWarningBatchCopy(model);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 批量复制
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 批量复制
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">马士基API批量复制指定数据</param>
|
|
|
|
|
/// <returns>返回执行结果消息</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("BatchCopy")]
|
|
|
|
|
public async Task<DataResult<string>> BatchCopy(MSKAPIBookingCopyDto model)
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.BatchCopy(model);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 同步BC状态(BC,Cancellation)
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 同步BC状态(BC,Cancellation)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="mblno">提单号</param>
|
|
|
|
|
/// <param name="tenantId">租户ID</param>
|
|
|
|
|
/// <param name="opTypeName">操作类型 BC-同步BC状态 Cancellation-同步取消状态</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("SyncBCInfo")]
|
|
|
|
|
public async Task<DataResult<MSKBookingResultDto>> SyncBCInfo(string mblno, long tenantId, string opTypeName = "BookingConfirmation")
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.SyncBCInfo(mblno, tenantId, opTypeName);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 获取初始化页面默认值
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取初始化页面默认值
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>返回详情</returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetInitInfo")]
|
|
|
|
|
public async Task<DataResult<MSKSPOTBookingInitDto>> GetInitInfo()
|
|
|
|
|
{
|
|
|
|
|
return await _spaceBookingMSKAPIService.GetInitInfo();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|