You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
3.0 KiB
C#

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
{
/// <summary>
/// 费用模板明细服务
/// </summary>
public class FeeTemplateDetailController : ApiController
{
private readonly IFeeTemplateDetailService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public FeeTemplateDetailController(IFeeTemplateDetailService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetFeeTemplateDetailList")]
public DataResult<List<FeeTemplateDetailRes>> GetFeeTemplateDetailList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 根据模板ID获取模板明细
/// </summary>
/// <param name="tid">模板ID</param>
/// <returns></returns>
[HttpGet]
[Route("GetListByTemplateId")]
public DataResult<List<FeeTemplateDetailRes>> GetListByTemplateId([FromQuery] long tid)
{
var res = _invokeService.GetListByTemplateId(tid);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditFeeTemplateDetail")]
public DataResult EditFeeTemplateDetail([FromBody] FeeTemplateDetailReq model)
{
var res = _invokeService.EditFeeTemplateDetail(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetFeeTemplateDetailInfo")]
public DataResult<FeeTemplateDetailRes> GetFeeTemplateDetailInfo([FromQuery] string id)
{
var res = _invokeService.GetFeeTemplateDetailInfo(id);
return res;
}
/// <summary>
/// 删除
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("DelFeeTemplateDetail")]
public DataResult DelFeeTemplateDetail([FromQuery] string id)
{
var res = _invokeService.DelFeeTemplateDetail(id);
return res;
}
/// <summary>
/// 批量删除
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("BatchDelFeeTemplateDetail")]
public DataResult BatchDelFeeTemplateDetail([FromBody] IdModel req)
{
var res = _invokeService.BatchDelFeeTemplateDetail(req);
return res;
}
}
}