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.

113 lines
2.9 KiB
C#

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;
/// <summary>
/// 结算方式服务
/// </summary>
public class CodeStlModeController : ApiController
{
private readonly ICodeStlModeService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public CodeStlModeController(ICodeStlModeService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetCodeStlModeList")]
public DataResult<List<CodeStlModeRes>> GetCodeStlModeList([FromBody] PageRequest request)
{
var res = _invokeService.GetClientListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditCodeStlMode")]
public DataResult EditCodeStlMode([FromBody] CodeStlModeReq model)
{
var res = _invokeService.EditClientCodeStlMode(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetCodeStlModeInfo")]
public DataResult<CodeStlModeRes> GetCodeStlModeInfo([FromQuery] string id)
{
var res = _invokeService.GetClientCodeStlModeInfo(id);
return res;
}
/// <summary>
/// 获取结算方式列表-基础库
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetBasicsCodeStlModeList")]
public DataResult<List<CodeStlModeRes>> GetBasicsCodeStlModeList([FromBody] PageRequest request)
{
var res = _invokeService.GetCodeStlModeList(request);
return res;
}
/// <summary>
/// 导入结算方式类型-基础库
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("ImportCodeStlMode")]
public DataResult ImportCodeStlMode([FromBody] IdModel req)
{
var res = _invokeService.ImportCodeStlMode(req);
return res;
}
/// <summary>
/// 获取当前租户已有的结算方式
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetExistCodeStlModeList")]
public DataResult<List<string>> GetExistCodeStlModeList()
{
var res = _invokeService.GetExistCodeStlModeList();
return res;
}
5 months ago
/// <summary>
/// 批量删除
/// </summary>
/// <param name="req">主表Ids</param>
/// <returns></returns>
[HttpPost]
[Route("BatchDelCodeStlMode")]
public DataResult BatchDelCodeStlMode([FromBody] IdModel req)
{
var res = _invokeService.BatchDelCodeStlMode(req);
return res;
}
}