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.AdminApi.Controllers; /// /// 系统编码模块 /// public class SequenceController : ApiController { private readonly ISequenceService _invokeService; private readonly ISequenceRuleService _sequenceRuleService; /// /// 构造函数 /// /// public SequenceController(ISequenceService invokeService,ISequenceRuleService SequenceRuleService) { _invokeService = invokeService; _sequenceRuleService = SequenceRuleService; } /// /// 系统编码列表 /// /// /// [HttpPost] [Route("GetSequenceTypeList")] public DataResult> GetSequenceList([FromBody] PageRequest request) { var res = _invokeService.GetListByPage(request); return res; } /// /// 编辑系统编码 /// /// /// [HttpPost] [Route("EditSequence")] public DataResult EditSequence([FromBody] SequenceReq model) { var res = _invokeService.EditSequence(model); return res; } /// /// 编码规则列表 /// /// /// [HttpPost] [Route("GetSequenceRuleList")] public DataResult> GetSequenceRuleList([FromBody] PageRequest request) { var res = _sequenceRuleService.GetListByPage(request); return res; } /// /// 编辑 编码规则 /// /// /// [HttpPost] [Route("EditSequenceRule")] public DataResult EditSequenceRule([FromBody] SequenceRuleReq model) { var res = _sequenceRuleService.EditSequenceRule(model); return res; } /// /// 系统编码详情 /// /// /// [HttpGet] [Route("GetSequenceInfo")] public DataResult GetSequenceInfo([FromQuery] string id) { var res = _invokeService.GetSequenceInfo(id); return res; } /// /// 编码规则详情 /// /// /// [HttpGet] [Route("GetSequenceRuleInfo")] public DataResult GetSequenceRuleInfo([FromQuery] string id) { var res = _sequenceRuleService.GetSequenceRuleInfo(id); return res; } }