using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
///
/// 往来单位固定费用-服务
///
public class FeeCustTemplateDetailController : ApiController
{
private readonly IFeeCustTemplateDetailService _invokeService;
///
/// 构造函数
///
///
public FeeCustTemplateDetailController(IFeeCustTemplateDetailService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetFeeCustTemplateDetailList")]
public DataResult> GetFeeCustTemplateDetailList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditFeeCustTemplateDetail")]
public DataResult EditFeeCustTemplateDetail([FromBody] FeeCustTemplateDetailReq model)
{
var res = _invokeService.EditFeeCustTemplateDetail(model);
return res;
}
///
/// 详情
///
///
///
[HttpGet]
[Route("GetFeeCustTemplateDetailInfo")]
public DataResult GetFeeCustTemplateDetailInfo([FromQuery] string id)
{
var res = _invokeService.GetFeeCustTemplateDetailInfo(id);
return res;
}
///
/// 根据ID删除
///
///
///
[HttpPost, Route("Delete")]
public async Task DeleteAsync([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _invokeService.DeleteAsync(model);
}
}
}