using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.MainApi.Controllers;
///
/// 付费方式服务
///
public class CodeFrtController : ApiController
{
private readonly ICodeFrtService _invokeService;
///
/// 构造函数
///
///
public CodeFrtController(ICodeFrtService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetCodeFrtList")]
public DataResult> GetCodeFrtList([FromBody] PageRequest request)
{
var res = _invokeService.GetClientListByPage(request);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditCodeFrt")]
public DataResult EditCodeFrt([FromBody] CodeFrtReq model)
{
var res = _invokeService.EditClientCodeFrt(model);
return res;
}
///
/// 详情
///
///
///
[HttpGet]
[Route("GetCodeFrtInfo")]
public DataResult GetCodeFrtInfo([FromQuery] string id)
{
var res = _invokeService.GetClientCodeFrtInfo(id);
return res;
}
///
/// 获取付费方式列表-基础库
///
///
///
[HttpPost]
[Route("GetBasicsCodeFrtList")]
public DataResult> GetBasicsCodeFrtList([FromBody] PageRequest request)
{
var res = _invokeService.GetCodeFrtList(request);
return res;
}
///
/// 导入付费方式类型-基础库
///
///
///
[HttpPost]
[Route("ImportCodeFrt")]
public DataResult ImportCodeFrt([FromBody] IdModel req)
{
var res = _invokeService.ImportCodeFrt(req);
return res;
}
///
/// 获取当前租户已有的付费方式
///
///
[HttpGet]
[Route("GetExistCodeFrtList")]
public DataResult> GetExistCodeFrtList()
{
var res = _invokeService.GetExistCodeFrtList();
return res;
}
///
/// 批量删除
///
/// 主表Ids
///
[HttpPost]
[Route("BatchDelCodeFrt")]
public DataResult BatchDelCodeFrt([FromBody] IdModel req)
{
var res = _invokeService.BatchDelCodeFrt(req);
return res;
}
}