Blame view

Hh.Mes.Api/Controllers/PDAController.cs 1.36 KB
赖素文 authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System;
using System.Collections.Generic;
using Hh.Mes.Api.Controllers;
using Hh.Mes.Common.Json;
using Hh.Mes.POJO.EnumEntitys;
using Hh.Mes.Service;
using Hh.Mes.Service.WebService.Planned;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Headers;
using Microsoft.AspNetCore.Mvc;

namespace Hh.Mes.Api.Controllers
{
    /// <summary>
    /// pda 查询接口
    /// ps:新增方法需要在SystemVariable 注册 APIListEnumLog 新增枚举 ,方便接口日志定位查询
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class PDAController :  BaseController
    {
23
        private readonly PDAService service;
赖素文 authored
24
25
26
        public PDAController(PDAService pdaService, IHttpContextAccessor accessor)
        {
赖素文 authored
27
28
29
            service = pdaService;
            context = accessor.HttpContext;
赖素文 authored
30
31
32
33
            var sysUserApi = base.GetUser(context);
            this.service.sysUserApi = sysUserApi;
        }
赖素文 authored
34
35
36
37
38
39


        /// <summary>
        /// PDA物料追溯查询
        /// </summary>
        /// <returns></returns>
40
        [HttpPost]
赖素文 authored
41
42
43
        [ActionName("Mes/V1/GetMaterialByPDABarCode")]
        public string GetMaterialInfoByBarCode(string barCode)
        {
44
45
            var result = service.GetMaterialInfoByBarCode(barCode);
            return Serialize(result);
赖素文 authored
46
47
48
        }
    }
}