using DS.Module.Core;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.OpApi.Controllers
{
///
/// 舱位标签管理
///
public class BookingLabelController : ApiController
{
private readonly IBookingLabelService _bookingLabelService;
public BookingLabelController(IBookingLabelService bookingLabelService)
{
_bookingLabelService = bookingLabelService;
}
#region 获取全部或指定范围类型的标签列表
///
/// 获取全部或指定范围类型的标签列表
///
/// 标签使用范围 空-全部 1-舱位管理台账
/// 返回列表
[HttpGet]
[Route("List")]
public async Task>> List([FromQuery] int? scope)
{
return await _bookingLabelService.List(scope);
}
#endregion
#region 设定标签
///
/// 设定标签
///
/// 请求参数
/// 返回回执
[HttpPost]
[Route("SetLabel")]
public async Task> SetLabel([FromBody] BindLabelDto input)
{
return await _bookingLabelService.SetLabel(input);
}
#endregion
#region 保存标签
///
/// 保存标签
///
/// 请求参数
/// 返回标签主键
[HttpPost]
[Route("Save")]
public async Task> Save([FromBody] BookingLabelBaseDto input)
{
return await _bookingLabelService.Save(input);
}
#endregion
#region 删除标签信息
///
/// 删除标签信息
///
/// 标签主键组
///
[HttpPost]
[Route("Delete")]
public async Task> Delete([FromBody] long[] ids)
{
return await _bookingLabelService.Delete(ids);
}
#endregion
#region 标签管理台账
///
/// 标签管理台账
///
/// 查询条件
/// 返回台账列表
[HttpPost]
[Route("GetPage")]
public async Task>> GetPageAsync([FromBody] PageRequest QuerySearch)
{
return await _bookingLabelService.GetPageAsync(QuerySearch);
}
#endregion
}
}