using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WIDESEA_Core; using WIDESEA_Core.BaseController; using WIDESEA_Core.CodeConfigEnum; using WIDESEA_Core.Helper; using WIDESEA_DTO.Basic; using WIDESEA_IBasicService; using WIDESEA_Model.Models; namespace WIDESEA_WMSServer.Controllers.Basic { [Route("api/MaterielInfo")] [ApiController] public class MaterielInfoController : ApiBaseController { public MaterielInfoController(IMaterielInfoService service) : base(service) { } /// /// 物料码解析 /// /// /// [HttpPost, HttpGet, Route("CodeAnalysis")] public WebResponseContent CodeAnalysis(string serNum) { try { MatSerNumAnalysisModel model = CodeAnalysisHelper.CodeAnalysis(AnalysisCodeEnum.MatSerNumAnalysis, serNum); return WebResponseContent.Instance.OK(data: model); } catch (Exception ex) { return WebResponseContent.Instance.Error(ex.Message); } } } }