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
2.9 KiB
C#
105 lines
2.9 KiB
C#
using DS.Module.Core;
|
|
using DS.WMS.Core.Code.Dtos;
|
|
using DS.WMS.Core.Code.Interface;
|
|
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 CodeSequenceController : ApiController
|
|
{
|
|
private readonly ICodeSequenceService _invokeService;
|
|
private readonly ICodeSequenceRuleService _sequenceRuleService;
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public CodeSequenceController(ICodeSequenceService invokeService, ICodeSequenceRuleService SequenceRuleService)
|
|
{
|
|
_invokeService = invokeService;
|
|
_sequenceRuleService = SequenceRuleService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 基础编码列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetSequenceTypeList")]
|
|
public DataResult<List<CodeSequenceRes>> 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] CodeSequenceReq model)
|
|
{
|
|
var res = _invokeService.EditSequence(model);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编码规则列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetSequenceRuleList")]
|
|
public DataResult<List<CodeSequenceRuleRes>> 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] CodeSequenceRuleReq model)
|
|
{
|
|
var res = _sequenceRuleService.EditSequenceRule(model);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 基础编码详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetSequenceInfo")]
|
|
public DataResult<CodeSequenceRes> GetSequenceInfo([FromQuery] string id)
|
|
{
|
|
var res = _invokeService.GetSequenceInfo(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 编码规则详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetSequenceRuleInfo")]
|
|
public DataResult<CodeSequenceRuleRes> GetSequenceRuleInfo([FromQuery] string id)
|
|
{
|
|
var res = _sequenceRuleService.GetSequenceRuleInfo(id);
|
|
return res;
|
|
}
|
|
|
|
|
|
} |