using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.MainApi.Controllers;
///
/// 订舱货物状态管理 服务
///
public class BookingGoodsStatusConfigController : ApiController
{
private readonly IBookingGoodsStatusConfigService _invokeService;
///
/// 构造函数
///
///
public BookingGoodsStatusConfigController(IBookingGoodsStatusConfigService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetBookingGoodsStatusConfigList")]
public DataResult> GetBookingGoodsStatusConfigList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditBookingGoodsStatusConfig")]
public DataResult EditBookingGoodsStatusConfig([FromBody] BookingGoodsStatusConfigReq model)
{
var res = _invokeService.EditBookingGoodsStatusConfig(model);
return res;
}
///
/// 详情
///
///
///
[HttpGet]
[Route("GetBookingGoodsStatusConfigInfo")]
public DataResult GetBookingGoodsStatusConfigInfo([FromQuery] string id)
{
var res = _invokeService.GetBookingGoodsStatusConfigInfo(id);
return res;
}
///
/// 批量删除
///
/// 主表Ids
///
[HttpPost]
[Route("BatchDelBookingStatusConfig")]
public DataResult BatchDelBookingStatusConfig([FromBody] IdModel req)
{
var res = _invokeService.BatchDelBookingStatusConfig(req);
return res;
}
///
/// 按Excel导入订舱货物状态
///
/// Excel文件
///
[HttpPost]
[Route("ImportBookingStatusConfigByExcel")]
public async Task> ImportBookingStatusConfigByExcel(IFormFile file)
{
var res = await _invokeService.ImportBookingStatusConfigByExcel(file);
return res;
}
}