You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.5 KiB
C#

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
{
/// <summary>
/// 订舱约号管理
/// </summary>
public class BookingContractNoManageController : ApiController
{
private readonly IBookingContractNoManageService _bookingContractNoManageService;
public BookingContractNoManageController(IBookingContractNoManageService bookingContractNoManageService)
{
_bookingContractNoManageService = bookingContractNoManageService;
}
#region 保存
/// <summary>
/// 保存
/// </summary>
/// <param name="model">合约号详情</param>
/// <returns>返回回执</returns>
[HttpPost]
[Route("Save")]
public async Task<DataResult<long>> Save([FromBody] BookingContractNoManageDto model)
{
return await _bookingContractNoManageService.Save(model);
}
#endregion
#region 主键获取合约号详情
/// <summary>
/// 主键获取合约号详情
/// </summary>
/// <param name="Id">合约号主键</param>
/// <returns>返回合约号详情</returns>
[HttpGet]
[Route("GetInfo")]
public async Task<DataResult<BookingContractNoManageDto>> GetInfo([FromQuery] long Id)
{
return await _bookingContractNoManageService.GetInfo(Id);
}
#endregion
#region 检索合约列表
/// <summary>
/// 检索合约列表
/// </summary>
/// <param name="queryItem">检索值可(模糊查询)</param>
/// <param name="top">返回记录最大行数</param>
/// <param name="carrier">船公司代码</param>
/// <param name="lane">航线代码</param>
/// <param name="lanecname">航线中文</param>
/// <param name="pod">目的港代码</param>
/// <returns>返回合约号详情列表</returns>
[HttpGet]
[Route("QuerytContractNoInfo")]
public async Task<DataResult<List<BookingContractNoManageDto>>> 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 作废(可批量删除)
/// <summary>
/// 作废(可批量删除)
/// </summary>
/// <param name="Ids">合约号主键组</param>
/// <returns>返回回执</returns>
[HttpGet]
[Route("Delete")]
public async Task<DataResult<string>> Delete([FromBody] long[] Ids)
{
return await _bookingContractNoManageService.Delete(Ids);
}
#endregion
#region 合约号管理台账
/// <summary>
/// 合约号管理台账
/// </summary>
/// <param name="QuerySearch">查询条件</param>
/// <returns>返回台账列表</returns>
[HttpPost]
[Route("GetPage")]
public async Task<DataResult<List<BookingContractNoManageDto>>> GetPageAsync([FromBody] PageRequest<BookingContractNoManageQueryDto> QuerySearch)
{
return await _bookingContractNoManageService.GetPageAsync(QuerySearch);
}
#endregion
}
}