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.

102 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 DS.WMS.Core.Sys.Dtos;
using DS.WMS.Core.Sys.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.MainApi.Controllers;
/// <summary>
/// 对账模板 模块
/// </summary>
public class CodeCheckBillTemplateController : ApiController
{
private readonly ICodeCheckBillTemplateService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public CodeCheckBillTemplateController(ICodeCheckBillTemplateService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetCheckBillTemplateList")]
public DataResult<List<CheckBillTemplateRes>> GetCheckBillTemplateList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("EditCheckBillTemplate")]
public DataResult EditCheckBillTemplate([FromBody] CheckBillTemplateReq req)
{
var res = _invokeService.EditCheckBillTemplate(req);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id">Id</param>
/// <returns></returns>
[HttpGet]
[Route("GetCheckBillTemplateInfo")]
public DataResult<CheckBillTemplateInfoRes> GetCheckBillTemplateInfo([FromQuery] string id)
{
var res = _invokeService.GetCheckBillTemplateInfo(id);
return res;
}
/// <summary>
/// 对账模板批量删除
/// </summary>
/// <param name="req">主表Ids</param>
/// <returns></returns>
[HttpPost]
[Route("BatchDelCheckBillTemplate")]
public DataResult BatchDelCheckBillTemplate([FromBody] IdModel req)
{
var res = _invokeService.BatchDelCheckBillTemplate(req);
return res;
}
/// <summary>
/// 对账模板费用批量删除
/// </summary>
/// <param name="req">主表Id及费用明细Ids</param>
/// <returns></returns>
[HttpPost]
[Route("BatchDelCheckBillTemplateFee")]
public DataResult BatchDelCheckBillTemplateFee([FromBody] IdModel req)
{
var res = _invokeService.BatchDelCheckBillTemplateFee(req);
return res;
}
/// <summary>
/// 对账模板排序批量删除
/// </summary>
/// <param name="req">主表Id及排序明细Ids</param>
/// <returns></returns>
[HttpPost]
[Route("BatchDelCheckBillTemplateSort")]
public DataResult BatchDelCheckBillTemplateSort([FromBody] IdModel req)
{
var res = _invokeService.BatchDelCheckBillTemplateSort(req);
return res;
}
}