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.
114 lines
3.2 KiB
C#
114 lines
3.2 KiB
C#
using DS.Module.Core;
|
|
using DS.WMS.Core.Sys.Dtos;
|
|
using DS.WMS.Core.Sys.Entity;
|
|
using DS.WMS.Core.Sys.Interface;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DS.WMS.MainApi.Controllers;
|
|
/// <summary>
|
|
/// 系统编码模块
|
|
/// </summary>
|
|
public class SequenceController : ApiController
|
|
{
|
|
private readonly ISequenceService _invokeService;
|
|
private readonly ISequenceRuleService _sequenceRuleService;
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public SequenceController(ISequenceService invokeService,ISequenceRuleService SequenceRuleService)
|
|
{
|
|
_invokeService = invokeService;
|
|
_sequenceRuleService = SequenceRuleService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 系统编码列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetSequenceTypeList")]
|
|
public DataResult<List<SequenceRes>> GetSequenceList([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetListByPage(request);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编辑系统编码
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditSequence")]
|
|
public DataResult EditSequence([FromBody] SequenceReq model)
|
|
{
|
|
var res = _invokeService.EditSequence(model);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编码规则列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetSequenceRuleList")]
|
|
public DataResult<List<SequenceRuleRes>> GetSequenceRuleList([FromBody] PageRequest request)
|
|
{
|
|
var res = _sequenceRuleService.GetListByPage(request);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编辑 编码规则
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditSequenceRule")]
|
|
public DataResult EditSequenceRule([FromBody] SequenceRuleReq model)
|
|
{
|
|
var res = _sequenceRuleService.EditSequenceRule(model);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 系统编码详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetSequenceInfo")]
|
|
public DataResult<SequenceRes> GetSequenceInfo([FromQuery] string id)
|
|
{
|
|
var res = _invokeService.GetSequenceInfo(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 编码规则详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetSequenceRuleInfo")]
|
|
public DataResult<SequenceRuleRes> GetSequenceRuleInfo([FromQuery] string id)
|
|
{
|
|
var res = _sequenceRuleService.GetSequenceRuleInfo(id);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取最新业务单据编码
|
|
/// </summary>
|
|
/// <param name="id">单据id</param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetSequenceNextTest")]
|
|
public DataResult<string> GetSequenceNextTest([FromQuery] string id)
|
|
{
|
|
var res = _invokeService.GetSequenceNextTest(id);
|
|
return res;
|
|
}
|
|
} |