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_State_Change_TemplatController : ApiController
{
private readonly ICM_State_Change_TemplatService _invokeService;
///
/// 构造函数
///
///
public CM_State_Change_TemplatController(ICM_State_Change_TemplatService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetCM_State_Change_TemplatList")]
public async Task>> GetCM_State_Change_TemplatList([FromBody] PageRequest request)
{
var res = await _invokeService.GetListByPage(request);
return res;
}
///
/// 直接编辑状态
///
///
[HttpPost]
[Route("EditCM_State_Change_Templat")]
public Task EditCM_State_Change_Templat([FromBody] CM_State_Change_TemplatReq model)
{
var res = _invokeService.EditCM_State_Change_Templat(model);
return res;
}
///
/// 查看详情
///
///
///
[HttpGet]
[Route("GetCM_State_Change_Templat")]
public DataResult GetCM_State_Change_Templat([FromQuery] string id)
{
var res = _invokeService.GetCM_State_Change_Templat(id);
return res;
}
///
/// 删除
///
/// 删除
///
[HttpPost, Route("DeleteCM_State_Change_Templat")]
public async Task DeleteCM_State_Change_Templat([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _invokeService.DeleteCM_State_Change_Templat(model.Ids);
}
///
/// 删除明细
///
/// 删除
///
[HttpPost, Route("DeleteCM_State_Change_TemplatDetail")]
public async Task DeleteCM_State_Change_TemplatDetail([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _invokeService.DeleteCM_State_Change_TemplatDetail(model.Ids);
}
}