using DS.Module.Core;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using Microsoft.AspNetCore.Mvc;
using Org.BouncyCastle.Crypto;
namespace DS.WMS.OpApi.Controllers
{
///
/// 订舱约号管理
///
public class BookingContractNoManageController : ApiController
{
private readonly IBookingContractNoManageService _bookingContractNoManageService;
public BookingContractNoManageController(IBookingContractNoManageService bookingContractNoManageService)
{
_bookingContractNoManageService = bookingContractNoManageService;
}
#region 保存
///
/// 保存
///
/// 合约号详情
/// 返回回执
[HttpPost]
[Route("Save")]
public async Task> Save([FromBody] BookingContractNoManageDto model)
{
return await _bookingContractNoManageService.Save(model);
}
#endregion
#region 主键获取合约号详情
///
/// 主键获取合约号详情
///
/// 合约号主键
/// 返回合约号详情
[HttpGet]
[Route("GetInfo")]
public async Task> GetInfo([FromQuery] long Id)
{
return await _bookingContractNoManageService.GetInfo(Id);
}
#endregion
#region 检索合约列表
///
/// 检索合约列表
///
/// 检索值可(模糊查询)
/// 返回记录最大行数
/// 船公司代码
/// 航线代码
/// 航线中文
/// 目的港代码
/// 返回合约号详情列表
[HttpGet]
[Route("QuerytContractNoInfo")]
public async Task>> QuerytContractNoInfo([FromQuery] string queryItem, [FromQuery] int top = 10,
[FromQuery] string carrier = "", [FromQuery] string lane = "", [FromQuery] string lanecname = "", [FromQuery] string pod = "")
{
return await _bookingContractNoManageService.QuerytContractNoInfo(queryItem, top, carrier, lane, lanecname, pod);
}
#endregion
#region 作废(可批量删除)
///
/// 作废(可批量删除)
///
/// 合约号主键组
/// 返回回执
[HttpGet]
[Route("Delete")]
public async Task> Delete([FromBody] long[] Ids)
{
return await _bookingContractNoManageService.Delete(Ids);
}
#endregion
#region 合约号管理台账
///
/// 合约号管理台账
///
/// 查询条件
/// 返回台账列表
[HttpPost]
[Route("GetPage")]
public async Task>> GetPageAsync([FromBody] PageRequest QuerySearch)
{
return await _bookingContractNoManageService.GetPageAsync(QuerySearch);
}
#endregion
}
}