1
hutongqing
2024-12-29 89051aef8a2c1a85d457914cf6317fe70e0e321c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
{
    /// <summary>
    /// 物料
    /// </summary>
    [Route("api/MaterielInfo")]
    [ApiController]
    public class MaterielInfoController : ApiBaseController<IMaterielInfoService, Dt_MaterielInfo>
    {
        public MaterielInfoController(IMaterielInfoService service) : base(service)
        {
        }
 
        /// <summary>
        /// 物料码解析
        /// </summary>
        /// <param name="serNum"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("CodeAnalysis")]
        public WebResponseContent CodeAnalysis(string serNum)
        {
            try
            {
                MatSerNumAnalysisModel model = CodeAnalysisHelper.CodeAnalysis<MatSerNumAnalysisModel>(AnalysisCodeEnum.MatSerNumAnalysis, serNum);
                return WebResponseContent.Instance.OK(data: model);
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
    }
}