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_CtnScrap_DetailController : ApiController
{
private readonly ICM_CtnScrap_DetailService _invokeService;
///
/// 构造函数
///
///
public CM_CtnScrap_DetailController(ICM_CtnScrap_DetailService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetCM_CtnScrap_DetailList")]
public async Task>> GetCM_CtnScrap_DetailList([FromBody] PageRequest request)
{
var res = await _invokeService.GetListByPage(request);
return res;
}
///
/// 直接编辑
///
///
//[HttpPost]
//[Route("EditCM_CtnScrap_Detail")]
//public DataResult EditCM_CtnScrap_Detail([FromBody] CM_CtnScrap_DetailReq model)
//{
// var res = _invokeService.EditCM_CtnScrap_Detail(model);
// return res;
//}
/////
///// 查看报废箱明细详情
/////
/////
/////
//[HttpGet]
//[Route("GetCM_CtnScrap_Detail")]
//public DataResult GetCM_CtnScrap_Detail([FromQuery] string id)
//{
// var res = _invokeService.GetCM_CtnScrap_Detail(id);
// return res;
//}
///
/// 删除报废箱
///
/// 删除报废箱
///
[HttpPost, Route("DeleteCM_CtnScrap_Detail")]
public async Task DeleteCM_CtnScrap_DetailAsync([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _invokeService.DeleteCM_CtnScrap_DetailAsync(model.Ids);
}
}