using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.ContainerManagement.Info.Dtos;
using DS.WMS.ContainerManagement.Info.Entity;
using DS.WMS.ContainerManagement.Info.Interface;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.Op.View;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.ContainerManagementApi.Controllers;
///
/// 租箱租入
///
public class CM_RentInController : ApiController
{
private readonly ICM_RentInService _invokeService;
///
/// 构造函数
///
///
public CM_RentInController(ICM_RentInService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetCM_RentInList")]
public async Task>> GetCM_RentInList([FromBody] PageRequest request)
{
var res = await _invokeService.GetListByPage(request);
return res;
}
///
/// 直接编辑状态
///
///
[HttpPost]
[Route("EditCM_RentIn")]
public Task EditCM_RentIn([FromBody] CM_RentInReq model)
{
var res = _invokeService.EditCM_RentIn(model);
return res;
}
///
/// 查看租箱租入详情
///
///
///
[HttpGet]
[Route("GetCM_RentIn")]
public DataResult GetCM_RentIn([FromQuery] string id)
{
var res = _invokeService.GetCM_RentIn(id);
return res;
}
///
/// 删除租箱租入
///
/// 删除租箱租入
///
[HttpPost, Route("DeleteCM_RentIn")]
public async Task DeleteCM_RentInAsync([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _invokeService.DeleteCM_RentInAsync(model.Ids);
}
///
/// 租箱租入_确认
///
///
///
[HttpPost]
[Route("CM_RentIn_Confirm")]
public Task CM_RentIn_Confirm([FromBody] string id)
{
var res = _invokeService.CM_RentIn_Confirm(id);
return res;
}
///
/// 租箱租入_取消
///
///
///
[HttpPost]
[Route("CM_RentIn_Cancel")]
public Task CM_RentIn_Cancel([FromBody] string id)
{
var res = _invokeService.CM_RentIn_Cancel(id);
return res;
}
///
/// 租箱租入_生成费用
///
///
///
[HttpPost]
[Route("CM_RentIn_MakeFee")]
public Task CM_RentIn_MakeFee([FromBody] string id)
{
var res = _invokeService.CM_RentIn_MakeFee(id);
return res;
}
}