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_RentOutController : ApiController { private readonly ICM_RentOutService _invokeService; /// /// 构造函数 /// /// public CM_RentOutController(ICM_RentOutService invokeService) { _invokeService = invokeService; } /// /// 列表 /// /// /// [HttpPost] [Route("GetCM_RentOutList")] public async Task>> GetCM_RentOutList([FromBody] PageRequest request) { var res = await _invokeService.GetListByPage(request); return res; } /// /// 直接编辑 /// /// [HttpPost] [Route("EditCM_RentOut")] public Task EditCM_RentOut([FromBody] CM_RentOutReq model) { var res = _invokeService.EditCM_RentOut(model); return res; } /// /// 查看租箱租出详情 /// /// /// [HttpGet] [Route("GetCM_RentOut")] public DataResult GetCM_RentOut([FromQuery] string id) { var res = _invokeService.GetCM_RentOut(id); return res; } /// /// 删除租箱租出 /// /// 删除租箱租出 /// [HttpPost, Route("DeleteCM_RentOut")] public async Task DeleteCM_RentOutAsync([FromBody] IdModel model) { if (!ModelState.IsValid) return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest); return await _invokeService.DeleteCM_RentOutAsync(model.Ids); } }